Set specific cache path regarding environment
This commit is contained in:
parent
1b36598391
commit
0b45e90e58
3 changed files with 15 additions and 3 deletions
|
@ -19,7 +19,11 @@ class CerfaUploader < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_dir
|
def cache_dir
|
||||||
|
if Rails.env.production?
|
||||||
'/tmp/tps-cache'
|
'/tmp/tps-cache'
|
||||||
|
else
|
||||||
|
'/tmp/tps-dev-cache'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
|
|
|
@ -19,7 +19,11 @@ class PieceJustificativeUploader < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_dir
|
def cache_dir
|
||||||
|
if Rails.env.production?
|
||||||
'/tmp/tps-cache'
|
'/tmp/tps-cache'
|
||||||
|
else
|
||||||
|
'/tmp/tps-dev-cache'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
|
|
|
@ -22,7 +22,11 @@ class ProcedureLogoUploader < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_dir
|
def cache_dir
|
||||||
|
if Rails.env.production?
|
||||||
'/tmp/tps-cache'
|
'/tmp/tps-cache'
|
||||||
|
else
|
||||||
|
'/tmp/tps-dev-cache'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
|
|
Loading…
Reference in a new issue