Forum: Ruby on Rails wierd problem with attachment_fu plugin?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bbdc298cd824989df148bc5312ab4bc3?d=identicon&s=25 chirag (Guest)
on 2007-06-27 05:56
(Received via mailing list)
I'm using the attachment_fu plugin in the following manner to upload a

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


  # POST /raw_data_files
  # POST /raw_data_files.xml
  def create
    @raw_data_file =[:raw_data_file])

    respond_to do |format|
        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) }
        format.html { render :action => "new" }
        format.xml  { render :xml => @raw_data_file.errors.to_xml }
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2007-06-27 08:26
(Received via mailing list)
On 6/26/07, chirag <> wrote:
>     There were problems with the following fields:
>       * Size is not included in the list

That's a validation error.  Either you set your min/max values
incorrectly, or you don't have rmagick/imagescience/minimagick so that
attachment_fu can set the correct size.

Rick Olson
Bbdc298cd824989df148bc5312ab4bc3?d=identicon&s=25 chirag (Guest)
on 2007-06-27 22:29
(Received via mailing list)
I changed the following line in the model from

:max_size => 2.megabytes

:size => 0.megabyte..2.megabytes

and it worked. Thanks rick!
This topic is locked and can not be replied to.