active_storage_validations
active_storage_validations copied to clipboard
New validation option to check that file extension matches mime type
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