mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Refactor FileHelper to use keyword arguments.
This commit is contained in:
@@ -93,7 +93,12 @@ class Upload < ActiveRecord::Base
|
||||
# download if external
|
||||
if external
|
||||
url = SiteSetting.scheme + ":" + previous_url
|
||||
file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil
|
||||
file = FileHelper.download(
|
||||
url,
|
||||
max_file_size: max_file_size_kb,
|
||||
tmp_file_name: "discourse",
|
||||
follow_redirect: true
|
||||
) rescue nil
|
||||
path = file.path
|
||||
else
|
||||
path = local_store.path_for(upload)
|
||||
|
||||
Reference in New Issue
Block a user