1

I'm in the process of migrating the Rails (4.1.6) website to a new server in AWS. Current website uses paperclip 4.2.2 along with CKeditor to upload images. Its working correctly. But when I migrated it to the new server it started throwing the below error -

[paperclip] Error while determining content type: Cocaine::CommandNotFoundError Command :: file -b --mime '/tmp/3f4380e1ea2c09e9224f025d0796034620170222-1345-nwrjpa.jpg' [paperclip] Content Type Spoof: Filename 7157_WIS161015_IMG_02_0000_max_656x437.jpg (application/octet-stream from Headers, [#] from Extension), content type discovered from file command: . See documentation to allow this combination.

I tried following the steps suggested in paperclip Github issues like adding paperclip.rb file in initializers like in this link
Also tried adding do_not_validate_attachment_file_type :data as well but that also didnt work.

Any help is appreciated.

Thanks

Community
  • 1
  • 1
Sai
  • 629
  • 1
  • 8
  • 26

0 Answers0