mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
small upload code refactor
This commit is contained in:
parent
91b3123e14
commit
0e5c9b2590
10 changed files with 89 additions and 105 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue