↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Uploading file to Azure Blob storage from Elixir

The post explains a simple workflow for uploading a file to Azure Blob storage from Elixir. It starts by creating a storage account, getting the account name and secondary access key, and adding a container for the files.

It then shows adding the erlazure dependency to a Mix project, starting the client process with the account and key, and using put_block_blob to upload a local file into the container. The uploaded file is then available at the Azure Blob URL format given in the post.

Reading notes
#

  • Create a storage account and use its account name and secondary access key.
  • Add a container for the files, either manually in Azure or with code; the example uses a container named test.
  • Use the erlazure Erlang library and add it as a Mix dependency.
  • Start the client with :erlazure.start(account, key) before making the request.
  • Upload the file with :erlazure.put_block_blob(pid, container, filename, file_contents).
  • The file becomes available at the blob URL shown in the post.