Question

I'm having problem with Rails plugin attachment_fu. On every upload, I get validation error

Size is not included in the list

I'm currently using

  • Rails 2.3.3
  • Ruby 1.8.6

The only thing I found about this problem is quite outdated discussion, which didn't help much.

Is there any solution to this problem?

I'm using attachment_fu, because I wanted to do AJAX file upload by this tutorial, but I couldn't get past the upload problem.

edit: I find only one solution that works, which is something like

def create
  @image = Image.new(params[:image])
  sleep 2 # for windows to catch up
  @image.save ...

but I don't really like doing it this way

Was it helpful?

Solution

I think what you're really doing there is giving it time for the image processor (Rmagick or ImageScience or whatever you have hooked up) to work.

If you are are creating lots of different sizes at upload, reducing those might help.

Also, in my own experience everything runs much slower in my dev environment than it does in actual production, you may not need the hard coded delay in production.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top