

The following example downloads a blob to a string with BlobClient.download method.

The following example downloads a blob by using a file path with the BlobClient.downloadToFile method: async function downloadBlobToFile(containerClient, blobName, fileNameWithPath) succeeded`) To learn how to create a container, see Create a container in Azure Storage with JavaScript. The name of the file can be set using the attribute value name, if not provided then the. The download attribute simply uses an anchor tag to prepare the location of the file that needs to be downloaded. Before you can upload a blob, you must first create a container. To trigger a file download on a button click we will use a custom function or HTML 5 download attribute. Blobs in Azure Storage are organized into containers.

The Blob is a raw data: you can read it both as binary data or text. The Blob object visualizes a blob that is a file-like object of immutable. The examples in this article assume that you've created a BlobServiceClient object by using the guidance in the Get started with Azure Blob Storage and JavaScript article. The browser has additional high-level objects.
