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.git
Then, switch to the appropriate folder:
cd v10
or
cd v12
Install 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 start
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.