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:
@@ -62,7 +62,11 @@ class UploadsController < ApplicationController
|
||||
if file.nil?
|
||||
if url.present? && is_api?
|
||||
maximum_upload_size = [SiteSetting.max_image_size_kb, SiteSetting.max_attachment_size_kb].max.kilobytes
|
||||
tempfile = FileHelper.download(url, maximum_upload_size, "discourse-upload-#{type}") rescue nil
|
||||
tempfile = FileHelper.download(
|
||||
url,
|
||||
max_file_size: maximum_upload_size,
|
||||
tmp_file_name: "discourse-upload-#{type}"
|
||||
) rescue nil
|
||||
filename = File.basename(URI.parse(url).path)
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user