media assets: move more file-handling logic into MediaAsset.
Move more of the file-handling logic from UploadService and StorageManager into MediaAsset. This is part of refactoring posts and uploads to allow multiple images per post.
This commit is contained in:
@@ -1194,7 +1194,7 @@ class Post < ApplicationRecord
|
||||
ModAction.log("<@#{user.name}> regenerated IQDB for post ##{id}", :post_regenerate_iqdb, user)
|
||||
else
|
||||
media_file = MediaFile.open(file, frame_data: pixiv_ugoira_frame_data&.data.to_a)
|
||||
UploadService::Utils.process_resizes(self, nil, id, media_file: media_file)
|
||||
media_asset.distribute_files!(media_file)
|
||||
|
||||
update!(
|
||||
image_width: media_file.width,
|
||||
|
||||
Reference in New Issue
Block a user