TRIVIAL: slightly better information when logging download error

This commit is contained in:
Régis Hanol 2014-05-12 16:57:52 +02:00
parent cf7a3e74ee
commit 51750f7d0e
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ class FileHelper
end
def self.download(url, max_file_size, tmp_file_name)
raise Discourse::InvalidParameters unless url =~ /^https?:\/\//
raise Discourse::InvalidParameters.new(:url) unless url =~ /^https?:\/\//
uri = URI.parse(url)
extension = File.extname(uri.path)