A
A
andiskiy2017-06-20 12:24:10
Ruby on Rails
andiskiy, 2017-06-20 12:24:10

Error uploading images/documents via Paperclip. What could be the problem?

Good afternoon, I'm facing an error that when uploading images to S3 via Paperclip I get an error has an extension that does not match its contents . I don’t experience such problems on a local machine, only on production. I started seeing this after updating rails 4.1.1 -> 4.1.16 and ruby ​​2.1.5 -> 2.3.1 and changing the instance to AWS .
Here is my validation:

validates_attachment    :document,
                        content_type: { not: "application/x-msdownload" }

I don't understand what is the problem. Any file I upload, whether it's an image or a document (of any extension), I get this error. Tell me please, what could be the reason for this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question