<%= form_for [:admin, @attachment], html: {multipart: true} do |f| %> <%= render 'alchemy/admin/partials/upload_form', { file_types: configuration(:uploader)['allowed_filetypes']['attachments'], file_types_description: _t(:documents), redirect_url: admin_attachments_path( swap: @swap, element_id: @element ? @element.id : nil, content_id: @content ? @content.id : nil, options: @options ? @options.to_json : nil), model_name: 'attachment', file_attribute: 'file', item_type: _t(:files) } %> <% end %>