<%= notice %>

Document · Download Links <% if params[:document_id] %> <%= link_to '+ New Download Link', new_document_document_download_path(@document), { class: 'btn btn-primary float-right' } %> <% end %>

<% if params[:document_id] %>

<%= @document.title %>

<% else %>

Import for Multiple Documents

<% end %>

Upload a CSV File

<%= simple_form_for DocumentDownload.new, url: import_admin_document_downloads_path, method: :post, multipart: true do |f| %>
<%= f.simple_fields_for :downloads do |download_fields| %> <%= download_fields.input :file, as: :file, input_html: {} %> <%- end %>
<%= submit_tag "+ Import CSV", {class: 'btn btn-primary'} %>
<% end %>

Example CSV File

friendlier_id label value
00add5b8-a7b1-42d4-b4de-ca99716a5096 GeoTIFF https://s3.amazonaws.com/holc/tiles/WI/Madison/1937/rectified.zip
00add5b8-a7b1-42d4-b4de-ca99716a5096 JPEG https://s3.amazonaws.com/holc/tiles/WI/Madison/1937/holc-scan.jpg
... ... ...
CSV File Column Definitions
friendlier_id
The associated GEOMG document's friendlier id
label
The label for the Download link
value
The URL for the Download link