mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:22:40 +08:00
FIX: FileHelper#download
should return nil if max size is exceeded.
This commit is contained in:
@ -67,7 +67,11 @@ class FileHelper
|
||||
|
||||
tmp.write(chunk)
|
||||
|
||||
throw :done if tmp.size > max_file_size
|
||||
if tmp.size > max_file_size
|
||||
tmp.close
|
||||
tmp = nil
|
||||
throw :done
|
||||
end
|
||||
end
|
||||
|
||||
tmp&.rewind
|
||||
|
Reference in New Issue
Block a user