Fix text extraction for cloned files [SCI-10227] (#7101)

This commit is contained in:
Alex Kriuchykhin 2024-02-16 12:51:47 +01:00 committed by GitHub
parent da8f2ff217
commit 156f9bda9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,7 +223,7 @@ class Asset < ApplicationRecord
raise ArgumentError, 'Destination asset should be persisted first!' unless to_asset.persisted?
file.blob.open do |tmp_file|
to_blob = ActiveStorage::Blob.create_and_upload!(io: tmp_file, filename: blob.filename, metadata: blob.metadata)
to_blob = ActiveStorage::Blob.create_and_upload!(io: tmp_file, filename: blob.filename)
to_asset.file.attach(to_blob)
end