| page_type | languages | products | description | urlFragment | ||||
|---|---|---|---|---|---|---|---|---|
sample |
|
|
How to stream blobs to Azure Blob Storage with Node.js. |
stream-blobs-nodejs |
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.gitThen, switch to the appropriate folder:
cd v10or
cd v12Install dependencies via npm:
npm install- Create a storage account.
- Create a container.
- Upload a stream to blockblob.
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 .env.example to .env.
Start the server:
npm startNavigate 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.