use file -b --mime 'test.json' have problem in AWS linux 2
Author: calos0921Created Nov 10, 2022Updated Nov 10, 2022
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'] }
Source: thoughtbot/paperclip