diff --git a/app/uploaders/cerfa_uploader.rb b/app/uploaders/cerfa_uploader.rb index c69dcbac8..b09da7e77 100644 --- a/app/uploaders/cerfa_uploader.rb +++ b/app/uploaders/cerfa_uploader.rb @@ -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. diff --git a/app/uploaders/piece_justificative_uploader.rb b/app/uploaders/piece_justificative_uploader.rb index ce446eb0a..22f07bc40 100644 --- a/app/uploaders/piece_justificative_uploader.rb +++ b/app/uploaders/piece_justificative_uploader.rb @@ -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. diff --git a/app/uploaders/procedure_logo_uploader.rb b/app/uploaders/procedure_logo_uploader.rb index 1199b32fa..b57540698 100644 --- a/app/uploaders/procedure_logo_uploader.rb +++ b/app/uploaders/procedure_logo_uploader.rb @@ -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.