<% if blob.representable? %>
<%= render "active_storage/blobs/web/representation", blob: blob %>
<% if caption = blob.try(:caption) %> <%= caption %> <% else %> <%= blob.filename %> <% end %> · <%= number_to_human_size blob.byte_size %> · <%= link_to rails_blob_path(blob, disposition: :attachment), class: "attachment__link", download: blob.filename, title: "Download #{blob.filename}" do %> Download <% end %>
<% else %>
<%= link_to rails_blob_path(blob, disposition: :attachment), class: "attachment__figure", download: blob.filename, title: "Download #{blob.filename}" do %> <%= render "active_storage/blobs/web/representation", blob: blob %> <% end %>
<% if caption = blob.try(:caption) %> <%= caption %> <% else %> <%= blob.filename %> <% end %>
<%= number_to_human_size blob.byte_size %> · <%= link_to rails_blob_path(blob, disposition: :attachment), class: "attachment__link", download: blob.filename, title: "Download #{blob.filename}" do %> Download <% end %>
<% end %>