I’m using the attachment_fu plugin in the following manner to upload a
file.
http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment_fu-and-responds_to_parent
I ge tthe following error if I upload a file that’s over 1K or so. It
works fine for small files (500 bytes or so):
1 error prohibited this raw data file from being saved
There were problems with the following fields:
* Size is not included in the list
This is using the POST action in the scaffold_resource generated
controller
Chirag
POST /raw_data_files
POST /raw_data_files.xml
def create
@raw_data_file = RawDataFile.new(params[:raw_data_file])
respond_to do |format|
if @raw_data_file.save
flash[:notice] = 'RawDataFile was successfully created.'
format.html { redirect_to raw_data_file_url(@raw_data_file) }
format.xml { head :created, :location =>
raw_data_file_url(@raw_data_file) }
else
format.html { render :action => “new” }
format.xml { render :xml => @raw_data_file.errors.to_xml }
end
end
end