2025-05-03 15:35:02 -04:00
|
|
|
<%= form_with model: import, class: "contents", data: {
|
|
|
|
|
controller: "direct-upload",
|
|
|
|
|
direct_upload_url_value: rails_direct_uploads_url,
|
2025-08-14 14:50:22 -04:00
|
|
|
direct_upload_user_trial_value: current_user.trial?,
|
2025-05-03 15:35:02 -04:00
|
|
|
direct_upload_target: "form"
|
|
|
|
|
} do |form| %>
|
2024-03-15 18:27:31 -04:00
|
|
|
<label class="form-control w-full max-w-xs my-5">
|
|
|
|
|
<div class="label">
|
2024-06-30 11:47:36 -04:00
|
|
|
<span class="label-text">Select one or multiple files</span>
|
2024-03-15 18:27:31 -04:00
|
|
|
</div>
|
2025-05-03 14:36:09 -04:00
|
|
|
<%= form.file_field :files,
|
|
|
|
|
multiple: true,
|
2025-05-03 15:35:02 -04:00
|
|
|
direct_upload: true,
|
2025-05-03 14:36:09 -04:00
|
|
|
class: "file-input file-input-bordered w-full max-w-xs",
|
|
|
|
|
data: { direct_upload_target: "input" } %>
|
2025-05-03 15:35:02 -04:00
|
|
|
<div class="text-sm text-gray-500 mt-2">
|
|
|
|
|
Files will be uploaded directly to storage. Please be patient during upload.
|
|
|
|
|
</div>
|
2024-03-15 18:27:31 -04:00
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<div class="inline">
|
2025-05-03 14:36:09 -04:00
|
|
|
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer",
|
|
|
|
|
data: { direct_upload_target: "submit" } %>
|
2024-03-15 18:27:31 -04:00
|
|
|
</div>
|
|
|
|
|
<% end %>
|