attachment_fu and really small files (and an extension?)

whats up guys..ive tried sifting through the archives of this forum but to no avail..i am using rick olson's attachment_fu (great stuff btw) but i run into problems when I have a really small file (like 20kb) and I go to upload it. For example, I upload a file called unrealircd.conf and i get the error,

"undefined method 'content_type'" and I see that the object is a string and not a file..even so, whenever i get rid of the extension (.conf) of the file, it uploads just fine. any ideas?

Michael Cramp wrote:

whats up guys..ive tried sifting through the archives of this forum but to no avail..i am using rick olson's attachment_fu (great stuff btw) but i run into problems when I have a really small file (like 20kb) and I go to upload it. For example, I upload a file called unrealircd.conf and i get the error,

"undefined method 'content_type'" and I see that the object is a string and not a file..even so, whenever i get rid of the extension (.conf) of the file, it uploads just fine. any ideas?

actually, i checked out my logs again..seems like that error is gone (seems to pop up randomly) but i am getting this when uploading a .torrent file:

ActiveRecord::RecordInvalid (Validation failed: Content type can't be blank, Size is not included in the list, Size can't be blank, Filename can't be blank):

I've had similar issues. Check your max size - sometimes it is just because the size of the file is too large.