thoughtbot / paperclip

Easy file attachment management for ActiveRecord
https://thoughtbot.com
Other
9.01k stars 2.43k forks source link

use file -b --mime 'test.json' have problem in AWS linux 2 #2707

Open calos0921 opened 1 year ago

calos0921 commented 1 year ago

We use the AWS linux2 image and to run file -b --mime 'test.json' result: text/plain; charset=us-ascii.

So we use application/json and text/plain to resolve the problem. validates_attachment :file, content_type: { content_type: ['application/json', 'text/plain'] }