Edit uploaded package

This commit is contained in:
chris committed 2012-10-26 11:19:57 +08:00
1 parent 0a1a9d2c2e
commit d7fd61ce55
28 files changed
+256 -251

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ class ImageUploader < CarrierWave::Uploader::Base
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"image/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
"#{model.id}"
end
# Provide a default URL as a default if there hasn't been a file uploaded:
@@ -48,7 +48,7 @@ class ImageUploader < CarrierWave::Uploader::Base
# end
version :thumb do
process :resize_to_fit => [200, 200]
process :resize_to_limit => [200, 200]
end
# Add a white list of extensions which are allowed to be uploaded.