Fix upload cache directory (opensimplif)

This commit is contained in:
Xavier J 2016-11-02 10:18:59 +01:00
parent 1376372c9e
commit 1ecfc62bb5
4 changed files with 18 additions and 31 deletions

View file

@ -1,6 +1,6 @@
# encoding: utf-8
class CerfaUploader < CarrierWave::Uploader::Base
class CerfaUploader < BaseUploader
before :cache, :set_original_filename
# Choose what kind of storage to use for this uploader:
@ -18,14 +18,6 @@ class CerfaUploader < CarrierWave::Uploader::Base
end
end
def cache_dir
if Rails.env.production?
'/tmp/tps-cache'
else
'/tmp/tps-dev-cache'
end
end
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list