Question

I'd like to remove content type limitations for uploading files for my own needs. I did try this:

validates_attachment_content_type :attachment, :content_type => ['/\Aimage\/.*\Z/', 'application/*']

but that doesn't work, what changes should I make to allow all file types to get uploaded?

Thank you.

Était-ce utile?

La solution

It should be just the matter of removing this line completely. It is not necessary for paperclip to work.

UPDATE:

This however got changed in recent Paperclip version. Now you need to specify you don't want to validate content with:

do_not_validate_attachment_file_type :attachment
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top