mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
small upload code refactor
This commit is contained in:
@ -462,7 +462,7 @@ class ImportScripts::Base
|
||||
src.close
|
||||
tmp.rewind
|
||||
|
||||
Upload.create_for(user_id, tmp, source_filename, File.size(tmp))
|
||||
Upload.create_for(user_id, tmp, source_filename, tmp.size)
|
||||
ensure
|
||||
tmp.close rescue nil
|
||||
tmp.unlink rescue nil
|
||||
|
Reference in New Issue
Block a user