attachment_fu content_type problem

Well,

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.

http://weblog.techno-weenie.net/2007/2/25/attachment_fu-tutorial

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

has_attachment

: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.