files and thumbs goes on storage path root
This commit is contained in:
parent
a68c00ab5f
commit
0217ba28b5
|
@ -21,7 +21,7 @@ class FileUploader < CarrierWave::Uploader::Base
|
|||
# This is a sensible default for uploaders that are meant to be mounted:
|
||||
def store_dir
|
||||
#{}"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||
ENV['STORAGE_PATH'] + "/files/#{model.album.path}"
|
||||
ENV['STORAGE_PATH'] + "/#{model.album.path}"
|
||||
end
|
||||
|
||||
# Provide a default URL as a default if there hasn't been a file uploaded
|
||||
|
@ -40,25 +40,25 @@ class FileUploader < CarrierWave::Uploader::Base
|
|||
version :collection do
|
||||
process :resize_to_fill => [200, 200]
|
||||
def store_dir
|
||||
ENV['STORAGE_PATH'] + "/files/thumbs/#{model.album.path}"
|
||||
ENV['STORAGE_PATH'] + "/thumbs/#{model.album.path}"
|
||||
end
|
||||
end
|
||||
version :album do
|
||||
process :resize_to_fill => [100, 100]
|
||||
def store_dir
|
||||
ENV['STORAGE_PATH'] + "/files/thumbs/#{model.album.path}"
|
||||
ENV['STORAGE_PATH'] + "/thumbs/#{model.album.path}"
|
||||
end
|
||||
end
|
||||
version :preview do
|
||||
process :resize_to_fit => [210, 210]
|
||||
def store_dir
|
||||
ENV['STORAGE_PATH'] + "/files/thumbs/#{model.album.path}"
|
||||
ENV['STORAGE_PATH'] + "/thumbs/#{model.album.path}"
|
||||
end
|
||||
end
|
||||
version :single do
|
||||
process :resize_to_limit => [950, 950]
|
||||
def store_dir
|
||||
ENV['STORAGE_PATH'] + "/files/thumbs/#{model.album.path}"
|
||||
ENV['STORAGE_PATH'] + "/thumbs/#{model.album.path}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue