arc_azure v0.1.2 Arc.Storage.Azure
This module provides an Arc storage adapter for Azure Storage
Link to this section Summary
Functions
Deletes the object from the server
Puts the file in Azure Storage Container
Builds path of the uploaded object
Link to this section Functions
Link to this function
default_tempurl_ttl()
Link to this function
delete(definition, version, arg)
Deletes the object from the server
Returns :ok
Examples
iex> Arc.Storage.Azure.delete(YourApp.Uploaders.Image, :thumbnail, {%{file_name: "Sample.png"}, "4958"})
:ok
Link to this function
put(definition, version, arg)
Puts the file in Azure Storage Container
Returns {:ok, file.file_name}
if upload successful or {:error, conn}
if upload fails.
Examples
iex> Arc.Storage.Azure.put(YourApp.Uploaders.Image, :thumbnail, {%{file_name: "Sample.png"}, "4958"})
{:ok, _conn} -> {:ok, file.file_name}
Link to this function
url(definition, version, file_and_scope, options \\ [])
Builds path of the uploaded object.
Returns the path (as a string) to the uploaded object.
Examples
iex> Arc.Storage.Azure.url(YourApp.Uploaders.Image, :thumbnail, {%{file_name: "Sample.png"}, "4958"})
"https://<your-azure-storage-container>.blob.core.windows.net/<destination-dir>/<filename>.<ext>"
"https://samplestoragecontainer.blob.core.windows.net/uploads/dev/images/4958/Sample.png"