DEV: Don't optimize image when migrating to new scheme.
The image has already been uploaded, the migrate to new scheme job's is just to correct the scheme and not the content of the upload.
This commit is contained in:
parent
5a8451bf89
commit
161a3c3870
|
@ -253,8 +253,7 @@ class Upload < ActiveRecord::Base
|
|||
if upload.sha1.blank?
|
||||
upload.sha1 = Upload.generate_digest(path)
|
||||
end
|
||||
# optimize if image
|
||||
FileHelper.optimize_image!(path) if FileHelper.is_supported_image?(File.basename(path))
|
||||
|
||||
# store to new location & update the filesize
|
||||
File.open(path) do |f|
|
||||
upload.url = Discourse.store.store_upload(f, upload)
|
||||
|
|
Loading…
Reference in New Issue