FIX: `uploads:migrate_to_s3` broken for GlobalSetting using file provider.

This commit is contained in:
Guo Xiang Tan 2019-03-11 14:21:35 +08:00
parent 0663ee5df2
commit d82876896e
1 changed files with 5 additions and 1 deletions

View File

@ -228,7 +228,11 @@ def migrate_to_s3
exit 1 exit 1
end end
unless GlobalSetting.use_s3? unless ENV["DISCOURSE_S3_SECRET_ACCESS_KEY"].present? &&
ENV["DISCOURSE_S3_REGION"].present? &&
ENV["DISCOURSE_S3_ACCESS_KEY_ID"].present? &&
ENV["DISCOURSE_S3_SECRET_ACCESS_KEY"].present?
puts <<~TEXT puts <<~TEXT
Please provide the following environment variables Please provide the following environment variables
- DISCOURSE_S3_BUCKET - DISCOURSE_S3_BUCKET