Azure Blob Storage
Last updated
Was this helpful?
Last updated
Was this helpful?
Azure Blob Storage is used to store arbitrary unstructured data like images, files, backups, etc. Aidbox offers integration with Blob Storage to simplify upload and retrieval of data. You can read more on Blob Storage internals . All examples from this tutorial are executable in the .
First of all, we have to create AzureAccount resource with id = account name and key = secret key of your account. Your account name and keys can be found under "Access keys" section in Azure Storage account settings.
Parameters
id
(required): Azure storage Account name
key
(required): Azure storage Account key
Example
Go to Azure console and create a container, for example, "avatars". Now we can create an AzureContainer resource:
Parameters
id
(optional): id to reference this container in Aidbox requests
account
(required): reference to AzureAccount
resource
storage
(required): Azure resource group name
container
(required): Azure container name
Example
When the configuration is complete, you can request a temporary URL to upload blobs. By default, such URL expires in 30 minutes. You can provide a blob name or just the extension (name will be generated).
Body parameters
blob
(required): file name
timeout
(optional, default: 30): timeout in minutes
Example
Configure CORS in Azure if you want to send data from the browser:
Now you can upload file from your UI using signed URL provided by Aidbox:
To read the uploaded file you can request a signed URL with:
For example, you can use a trick with redirect to render an image: