Fix #3234: Incorrect filesize on upload page.
This commit is contained in:
@@ -26,9 +26,9 @@ module Downloads
|
|||||||
end
|
end
|
||||||
|
|
||||||
def size
|
def size
|
||||||
@source, _, @data = before_download(@source, @data)
|
@source, headers, @data = before_download(@source, @data)
|
||||||
url = URI.parse(@source)
|
options = { timeout: 3, headers: headers }.deep_merge(Danbooru.config.httparty_options)
|
||||||
res = HTTParty.head(url, Danbooru.config.httparty_options.reverse_merge(timeout: 3))
|
res = HTTParty.head(@source, options)
|
||||||
res.content_length
|
res.content_length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user