module ActiveStorage::Downloading

def open_tempfile_for_blob

def open_tempfile_for_blob
  tempfile = Tempfile.open([ "ActiveStorage", blob.filename.extension_with_delimiter ], tempdir)
  begin
    yield tempfile
  ensure
    tempfile.close!
  end
end