<%
if url
  doc_title = File.basename(url)
  doc_url = url
else
  doc_title = "{{filename}}"
  doc_url = "{{url}}"
end
%>

<div class="doc-preview">
  <div class="doc-preview__info">
    <h4><%= doc_title %></h4>
    <%= hidden_field_tag 'documents', doc_url, name: 'step[documents][]' %>
    <p class="text--help"><%= link_to 'Delete', '#', class: "link--subtle  link--delete" %></p>
  </div>
  <div class="doc-preview__thumb" style="background-image: url('<%= doc_url %>')">
  </div>
</div>

<%
if url
  doc_title = File.basename(url)
  doc_url = url
else
  doc_title = "{{filename}}"
  doc_url = "{{url}}"
end
%>

<div class="doc-preview">
  <div class="doc-preview__info">
    <h4><%= doc_title %></h4>
    <%= hidden_field_tag 'documents', doc_url, name: 'step[documents][]' %>
    <p class="text--help"><%= link_to 'Delete', '#', class: "link--subtle  link--delete" %></p>
  </div>
  <div class="doc-preview__thumb" style="background-image: url('<%= doc_url %>')">
  </div>
  <p class="text--error">
    <i class="icon-warning"></i>
    The image you uploaded is less than 2MB, and may not be readable. Please be aware that you may be asked to provide the document again.
  </p>
</div>

Add error message for small photo sizes
Add error message for small photo sizes
