attachment_fu content_type problem


It doesn’t look the my issue had to deal with the content_type at all. Rather it was related to the size of the attachment. Seems that for files < about 16k, Attachment_fu handles them as a StringObject. If they exceed 16k they are stored as temp files which causes issues in windows.

Since the files size stored in the database doesn’t matter to me I just modified my model.


:content_type => [‘application/pdf’, ‘application/msword’, ‘text/plain’],

:storage => :file_system,

:size => 0.byte…1.megabytes

If anybody knows of a better way to handle this, please let me know.