paperclip使ってzipとかdmgとか画像以外のファイルをアップロードする
paperclip (4.2.1)
class Post < ActiveRecord::Base has_attached_file :attachment, styles: { thumb: "100x100>" } do_not_validate_attachment_file_type :attachment before_post_process :skip_not_image def image? /\Aimage\/.*\Z/ =~ attachment_content_type end private def skip_not_image image? end end
before_post_processでfalseを返せばよいみたいです。
imageMagic前提な作りなんですね。