mrrooijen / mongoid-paperclip

Mongoid::Paperclip enables you to use Paperclip with the Mongoid ODM for MongoDB.
MIT License
344 stars 119 forks source link

Paperclip validation problem on production #70

Closed BilalReffas closed 8 years ago

BilalReffas commented 8 years ago

I have a Problem when I deploy my application on google cloud I get this error

has contents that are not what they are reported to be

Locally it works fine! I already tried to using the command_path. So I really don't know what I have to do next...

This is my model

has_mongoid_attached_file  :image,
    :styles => { :large => "380x380!" , :medium => "240x240", :small => "120x120!" },
    :storage => :fog,
    :fog_public => true,
    :fog_directory => 'XXXX',
    :path => "images/:id/:style/:basename.:extension",
    :fog_credentials => {  :provider => 'Google',
                           :google_storage_access_key_id => 'XXXXX',
                           :google_storage_secret_access_key => 'XXXXX'}

  validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]

Thank you for your efforts. I hope you guys can help me

tilsammans commented 8 years ago

The error you mention comes from paperclip, and not from this gem.