diff --git a/app/models/asset.rb b/app/models/asset.rb index eaeedc0df..316e0b978 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -451,7 +451,7 @@ class Asset < ApplicationRecord def generate_temp_file tempfile = Tempfile.new tempfile.binmode - tempfile << file.download + file.blob.download { |chunk| tempfile.write(chunk) } tempfile.rewind tempfile end diff --git a/app/models/tiny_mce_asset.rb b/app/models/tiny_mce_asset.rb index 70f0dda5b..5bdd455b1 100644 --- a/app/models/tiny_mce_asset.rb +++ b/app/models/tiny_mce_asset.rb @@ -194,7 +194,7 @@ class TinyMceAsset < ApplicationRecord def generate_temp_file tempfile = Tempfile.new tempfile.binmode - tempfile << image.download + image.blob.download { |chunk| tempfile.write(chunk) } tempfile.rewind tempfile end