Pregunta

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.

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top