thoughtbot/paperclip — pull request #869 by rfc2822 (2012-05-12 17:23:00+00:00)
Title: Don't trust content_type of Http::UploadedFile

Unfortunately, browsers often sent a wrong Content-Type for uploaded files because the file type is not registered on the client system or for other reasons. From the application provider's sight, this information should be only used as fallback when the determination via the file command (like for non-uploaded files) fails. I adapted the UploadedFileAdapater to do it like the FileAdapter, but use the Content-Type as fallback. Tests included.

(I hope this pull request is OK. It should be only +29 lines -2 lines, but it shows 6 commits because I had to get my fork up-to-date from upstream.)

Please tell me if you can't use this pull request for some reasons and how I can change it, because I'd rather like to use the upstream paperclip in my application than my custom one.

Thanks for paperclip.