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.




Thank you! I’ve had loads of attachment_fu image upload errors, hopefully this will cure the last of them.
A related problem I also had that might help some people is that Attachment_Fu sometimes gives the same error if the path to the file is long (e.g. if you’re uploading a test file from the Windows desktop or from My Documents).