I tried the following command
curl -F “[email protected]”
http://localhost:3000/raw_data_files/create
and got the following errors from attachment_fu (file upload plugin)
There were problems with the following fields:
* Content type can’t be blank
* Size is not included in the list
* Size can’t be blank
* Filename can’t be blank
Here’s my view which works fine on the upload (unlike cURL):
<%= error_messages_for :raw_data_file %>
<% form_for(:raw_data_file, :url => raw_data_files_path, :html =>
{ :multipart => true }) do |form| %>
Upload a file: <%= form.file_field :uploaded_data %>
<%= submit_tag "Create" %>
<% end %>How do I manually set the filename, size, and content type in cURL? It
works fine with the above RoR view.
Chirag