mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: ensure we can download maxmind without redis or db config
This also corrects FileHelper.download so it supports "follow_redirect" correctly (it used to always follow 1 redirect) and adds a `validate_url` param that will bypass all uri validation if set to false (default is true)
This commit is contained in:
parent
e4e2acf148
commit
7429700389
7 changed files with 55 additions and 15 deletions
|
@ -70,7 +70,8 @@ module ImportScripts::PhpBB3
|
|||
avatar_file = FileHelper.download(
|
||||
url,
|
||||
max_file_size: max_image_size_kb,
|
||||
tmp_file_name: 'discourse-avatar'
|
||||
tmp_file_name: 'discourse-avatar',
|
||||
follow_redirect: true
|
||||
)
|
||||
rescue StandardError => err
|
||||
warn "Error downloading avatar: #{err.message}. Skipping..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue