Log error when optimized image file fails to store. (#8840)

This commit is contained in:
Stephen Chung 2020-02-04 01:28:45 +08:00 committed by GitHub
parent a96eba9714
commit 98e9302c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -110,6 +110,8 @@ class OptimizedImage < ActiveRecord::Base
if url.present?
thumbnail.url = url
thumbnail.save
else
Rails.logger.error("Failed to store optimized image of size #{width}x#{height} from url: #{upload.url}\nTemp image path: #{temp_path}")
end
end
end