media assets: fix error when generating thumbnails for corrupt files.
Fix an error being raised when trying to generate thumbnails for corrupt files. If the original image is corrupt, then ignore any errors and let libvips try to generate a thumbnail as best it can. This will usually result in an incomplete thumbnail.
This commit is contained in:
@@ -53,7 +53,7 @@ class MediaAsset < ApplicationRecord
|
||||
def open_file
|
||||
file = storage_service.open(file_path)
|
||||
frame_data = media_asset.pixiv_ugoira_frame_data&.data if media_asset.is_ugoira?
|
||||
MediaFile.open(file, frame_data: frame_data)
|
||||
MediaFile.open(file, frame_data: frame_data, strict: false)
|
||||
end
|
||||
|
||||
def convert_file(media_file)
|
||||
|
||||
Reference in New Issue
Block a user