Mar 13 / Rupak Ganguly
Attachment_fu size parameter on Windows
Well, long story short, I have been going crazy trying to make attachment_fu upload a image file greater than 10KB in size on Windows. It keeps showing an error message “Size is not in the list”. Turns out that the size parameter needs to explicitly set to the following:
has_attachment :content_type => :image, :size => 0.kilobytes..1.gigabytes
The important part is that you have to specify the minimum limit as 0.kilobytes or it will not work.
Checkout some of the other attachment_fu gotchas.