-
-
Save leemcalilly/5e43f6524734991773ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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