Flush tempfile after populating it
Ensure that other processes like ImageMagick and FFmpeg see the complete contents of the file.
This commit is contained in:
parent
ef5902a2f1
commit
e4c5186428
@ -27,6 +27,7 @@ def open_tempfile_for_blob
|
||||
def download_blob_to(file) #:doc:
|
||||
file.binmode
|
||||
blob.download { |chunk| file.write(chunk) }
|
||||
file.flush
|
||||
file.rewind
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user