Skip to content

Instantly share code, notes, and snippets.

@leemcalilly
Created August 2, 2013 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemcalilly/5e43f6524734991773ae to your computer and use it in GitHub Desktop.
Save leemcalilly/5e43f6524734991773ae to your computer and use it in GitHub Desktop.
# encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
include CarrierWave::MimeTypes
process :set_content_type
storage :fog
# Create different versions of your uploaded files:
version :small do
process :resize_to_fill => [220, 220]
end
version :medium do
process :resize_to_fill => [440, 440]
end
version :large do
process :resize_to_limit => [720, 2000]
end
def extension_white_list
%w(jpg jpeg gif png)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment