Fix the content-type for file uploads with the rack-fix-content-type gem
We wrote the rack-fix-content-type gem to fix the content type of form uploads (by using the file-utility). A lot of browsers screw up the content type so we don’t trust the given value in the header. We had a couple of different content-types for each type of uploaded file which can create a lot of trouble (for example when using the content-type in mail attachments).
Post a comment