<%= simple_form_for(Upload.new, url: uploads_path(format: :json), html: { class: "flex flex-col", autocomplete: "off" }, remote: true) do |f| %> <%= f.input :files, as: :file, wrapper_html: { class: "hidden" }, input_html: { "multiple": max_files_per_upload > 1 } %>
Choose file or drag image here
Max size: <%= number_to_human_size(Danbooru.config.max_file_size) %>.

— or —

<%= f.input :source, label: false, as: :string, placeholder: "Paste URL here", input_html: { value: url, class: "text-center" }, wrapper_html: { class: "px-4 text-center" } %> <%= f.input :referer_url, as: :hidden, input_html: { value: referer_url } %> <%= f.submit "Upload", class: "button-primary text-center mx-auto hidden", "data-disable-with": false %> <% end %> <%= spinner_icon(class: "hidden absolute inset-0 m-auto h-12 link-color") %>