mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Fix download file
This commit is contained in:
parent
b762ae6a90
commit
7e379d4e0d
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue