Domanda

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.

È stato utile?

Soluzione

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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top