Set specific cache path regarding environment
This commit is contained in:
parent
32870e8128
commit
0c67cda7c5
3 changed files with 15 additions and 3 deletions
|
@ -19,7 +19,11 @@ class CerfaUploader < CarrierWave::Uploader::Base
|
|||
end
|
||||
|
||||
def cache_dir
|
||||
'/tmp/tps-cache'
|
||||
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.
|
||||
|
|
|
@ -19,7 +19,11 @@ class PieceJustificativeUploader < CarrierWave::Uploader::Base
|
|||
end
|
||||
|
||||
def cache_dir
|
||||
'/tmp/tps-cache'
|
||||
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.
|
||||
|
|
|
@ -22,7 +22,11 @@ class ProcedureLogoUploader < CarrierWave::Uploader::Base
|
|||
end
|
||||
|
||||
def cache_dir
|
||||
'/tmp/tps-cache'
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue