FIX: undefined method 'max_file_size_kb'

This commit is contained in:
Régis Hanol
2015-05-26 16:39:41 +02:00
parent 9cd6b91b6d
commit a5d93c6705
3 changed files with 4 additions and 6 deletions

View File

@ -58,8 +58,9 @@ module FileStore
file = get_from_cache(filename)
if !file
max_file_size_kb = [SiteSetting.max_image_size_kb, SiteSetting.max_attachment_size_kb].max.kilobytes
url = SiteSetting.scheme + ":" + upload.url
file = FileHelper.download(url, SiteSetting.max_file_size_kb, "discourse-s3", true)
file = FileHelper.download(url, max_file_size_kb, "discourse-s3", true)
cache_file(file, filename)
end