How to stream blobs to Azure Blob Storage with Node.js
In this sample, you will find the following folders:
- v10 - references Storage Blob SDK v10
- v12 - references Storage Blob SDK v12
If you don't have a Microsoft Azure subscription, you can get a free account before you begin.
Clone the repository to your machine:
git clone https://github.com/Azure-Samples/azure-sdk-for-js-storage-blob-stream-nodejs.git
Then, switch to the appropriate folder:
Install dependencies via
This Sample shows how to do following operations of Storage Blobs
- Create a storage account.
- Create a container.
- Upload a stream to blockblob.
Adding your storage account name and key
Navigate to your storage account in the Azure Portal and copy the account name and key (under Settings > Access keys) into the
.env.example file. Save the file and then rename it from
Running the sample
Start the server:
Navigate to http://localhost:3000 and upload an image to blob storage.
You can use the Azure Storage Explorer to view blob containers and verify your upload is successful.