I’ve found that Paperclip can validate file content type, i.e. image/jpeg, but I want to specifically validate the extension. This is because I’m working with an obscure extension that won’t get a consistent content type. Anyone know if this is doable, or a good way to do this?
I’ve found that Paperclip can validate file content type, i.e. image/jpeg, but I want
Share
Guess, there is no need to validate it with paperclip’s method. You can rather use something like:
Edit:
Alternatively, to validate it with paperclip:
^ it will generate content-type mismatch errors automatically.