Method: Paperclip::Storage::AzureStorage#copy_to_local_file

Defined in:
lib/paperclip/storage/azure_storage.rb

#copy_to_local_file(style, local_dest_path) ⇒ Object



43
44
45
46
47
# File 'lib/paperclip/storage/azure_storage.rb', line 43

def copy_to_local_file(style, local_dest_path)
  container = @options[:container]
  _blob, content = storage_client.get_blob(container, path(style), timeout: 60)
  ::File.open(local_dest_path, 'wb') { |local_file| local_file.write(content) }
end