Azure Blob Storage Commands

◷ Reading Time: 1 minute

Save Blob

Creates or updates a blob in the given container.

Summary
  • Data Source (required): String value for the connection to the storage.
  • Container Name (required): The name of the container.
  • File Name (required): The name of the file.
  • Content (required): The contents of the file in either string or byte array format.

Example

Save blob from String Content

1. Add a Save Blob activity to your flow.

2. Set the arguments.
For the content, enter a string value.

3. Execute the flow and your blob will be saved.
You can view blobs that have been saved by signing in to Azure Portal and navigating to Your Storage Account > Your Container.

Save blob from Local File

1. Set up a variable definition to hold the contents of the file.

2. Add a file input by adding the activity Data > Sources > File.

3. Set the file input Action FileSource properties.

  • Type: Binary
  • Return: Name of the variable created to temporarily hold the content.
  • Uri: Path to the file you want to upload.

4. Add a Save Blob activity.

5. Set the arguments.
For the content, use the name of the variable holding the content.

6. Execute the flow and your blob will be saved.
You can view blobs that have been saved by signing in to Azure Portal and navigating to Your Storage Account > Your Container.

Read Blob

Reads a blob from the given container with a particular file name.

Summary
  • Data Source (required): String value for the connection to the storage.
  • Container Name (required): The name of the container.
  • File Name (required): The name of the file.

Example

Read blob

1. Create a variable to store the file content.

2. Add a Read Blob activity.

3. Set the arguments.

4. Set Copy Result To field to the variable created to hold the content.

5. When you execute the flow, you will be able to use the blob’s contents as they will be loaded in to the fileContent variable.

Delete Blob

Deletes a blob in the given container with a particular file name.

Summary
  • Data Source (required): String value for the connection to the storage.
  • Container Name (required): The name of the container.
  • File Name (required): The name of the file.

Example

Delete blob

1. Add a Delete Blob activity.

2. Set the arguments.
The File Name should be a valid blob in your container.

You can view blobs that have been saved by signing in to Azure Portal and navigating to Your Storage Account > Your Container.

3. Execute the flow.
Your blob should now be deleted.

Updated on February 25, 2020

Was this article helpful?

Related Articles