Search code examples
ruby-on-railsinternet-explorer-8paperclip-validation

Paperclip photo upload fails in IE8


I'm using paperclip to upload image in my app. The validation I've is :

 validates_attachment_content_type :image, :content_type => ['image/jpg','image/jpeg', 'image/png', 'image/tiff', 'image/gif']

Everything works well in firefox, chorme and IE9. But in IE8, I get an error - "Photos image content type Invalid format !!!"

Any solution or clue is much appreciated.


Solution

  • says it needs extra image format image/pjpeg in content type i.e. :content_type => ['image/pjpeg']

    Below will be helpful for sure.

    http://blog.joshsoftware.com/2010/11/26/paperclip-validates_attachment_content_type-always-fails-in-ie-6-and-7-for-jepg-and-png-image/

    http://blog.siyelo.com/tip-of-the-day-mime-types-for-paperclip-ie8