Read more

Only allow pictures as Paperclip attachments

Tobias Kraze
August 27, 2010Software engineer at makandra GmbH
validates_attachment_content_type :image, :content_type => /^image\/(jpg|jpeg|pjpeg|png|x-png|gif)$/, :message => 'file type is not allowed (only jpeg/png/gif images)'
Illustration online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
Read more Show archive.org snapshot
Posted by Tobias Kraze to makandra dev (2010-08-27 11:48)