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:
George Claghorn 2018-04-23 16:42:47 -05:00
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