mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Refactor FileHelper
to use keyword arguments.
This commit is contained in:
parent
87ac758f05
commit
cdbe027c1c
12 changed files with 81 additions and 15 deletions
|
@ -65,7 +65,11 @@ module ImportScripts::PhpBB3
|
|||
max_image_size_kb = SiteSetting.max_image_size_kb.kilobytes
|
||||
|
||||
begin
|
||||
avatar_file = FileHelper.download(url, max_image_size_kb, 'discourse-avatar')
|
||||
avatar_file = FileHelper.download(
|
||||
url,
|
||||
max_file_size: max_image_size_kb,
|
||||
tmp_file_name: 'discourse-avatar'
|
||||
)
|
||||
rescue StandardError => err
|
||||
warn "Error downloading avatar: #{err.message}. Skipping..."
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue