active_storage_validations icon indicating copy to clipboard operation
active_storage_validations copied to clipboard

New validation option to check that file extension matches mime type

Open tagliala opened this issue 1 year ago • 5 comments

Hi,

I would like to propose a new validation that checks if the extension matches the actual content type of the document. This should help to prevent upload of a .pdf which is actually a .docx

I don't know a good name for this validation, or if it should be an option of content_type, like match_extension: true

I can work on a PR if you are interested

tagliala avatar Jun 27 '23 17:06 tagliala