Rails 4, Paperclip 4.2.1 give error with binary file upload
问题 I have following setup with rails 4 and paperclip 4.2.1 class Post< ActiveRecord::Base has_attached_file :key allowed_content_type = ['text/plain', 'text/rtf', 'text/richtext', 'application/txt', 'application/octet-stream'] validates_attachment_content_type :key, :content_type => allowed_content_type, :message=> "Only #{allowed_content_type} is allowed" I have this in my application.rb <body data-controller="<%= controller.controller_path %>" data-action="<%= controller.action_name %>" data