mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
REFACTOR: upload workflow creation into UploadCreator
- Automatically convert large-ish PNG/BMP to JPEG - Updated fast_image to latest version
This commit is contained in:
@ -15,7 +15,7 @@ module ImportScripts
|
||||
src.close
|
||||
tmp.rewind
|
||||
|
||||
Upload.create_for(user_id, tmp, source_filename, tmp.size)
|
||||
UploadCreator.new(tmp, source_filename).create_for(user_id)
|
||||
rescue => e
|
||||
Rails.logger.error("Failed to create upload: #{e}")
|
||||
nil
|
||||
|
Reference in New Issue
Block a user