Method: Paperclip::Storage::AzureStorage#flush_writes

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

#flush_writesObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/paperclip/storage/azure_storage.rb', line 19

def flush_writes
  container = @options[:container]
  @queued_for_write.each do |style_name, file|
    storage_client.create_block_blob(
      container,
      path(style_name),
      file.read,
      timeout: 60,
      content_type: file.content_type,
      content_length: file.size
    )
  end

  after_flush_writes
  @queued_for_write = {}
end