A platform for community discussion. Free, open, simple.
DEV: Don't optimize image when migrating to new scheme.
Guo Xiang Tan161a3c38706a
diff --git a/app/models/upload.rb b/app/models/upload.rbindex 8e1b312b9aa..fd3f3c86a2e 100644--- a/app/models/upload.rb+++ b/app/models/upload.rb@@ -253,8 +253,7 @@ class Upload < ActiveRecord::Baseif 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 filesizeFile.open(path) do |f|upload.url = Discourse.store.store_upload(f, upload)