Method: Paperclip::Storage::AzureStorage#exists?

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

#exists?(style_name = default_style) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
17
# File 'lib/paperclip/storage/azure_storage.rb', line 9

def exists?(style_name = default_style)
  container = @options[:container]
  storage_client.list_blobs(
    container,
    prefix: path(style_name),
    max_results: 1,
    timeout: 60
  ).present?
end