Azure-Samples / Azure Sdk For Js Storage Blob Stream Nodejs
Licence: mit
How to stream blobs to Azure Blob Storage with Node.js
Stars: ✭ 26
Programming Languages
javascript
184084 projects - #8 most used programming language
page_type: sample languages:
- javascript
- nodejs products:
- azure
- azure-storage description: "How to stream blobs to Azure Blob Storage with Node.js." urlFragment: stream-blobs-nodejs
How to stream blobs to Azure Blob Storage with Node.js
SDK Versions
In this sample, you will find the following folders:
- v10 - references Storage Blob SDK v10
- v12 - references Storage Blob SDK v12
Prerequisites
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
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 .env.example
to .env
.
Running the sample
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].