AMAZON CONTENT

Azure Blob Service | Upload Image to Azure | Nodejs

Store image in Azure using Azure Blob Service 




Hello guys, HiFi after a very long time. Today I am going to talk about one topic, "How can one upload files/images to Azure portal, using Azure's Blob Service ? Without wasting our time, lets jump directly to the point...


Requirement:

  1. You should have Azure account access.

We need to Login into Azure Account and setup Storage Account inside it. 



Please note down Storage Account name somewhere while creating storage account, as we need that in our code.


Once storage account is created, please select it from Home Screen and click on Access Keys sub menu to get the account key.


Please note down the account key somewhere, we need that in code.

Now we are all done with 3rd party service action. Now we need to jump straight to code. Please see the below code.

To run below code in local, copy below file code in index.js in your system. Do "npm init --yes" at that file. Run npm install command mentioned in below file. Do npm install nodemon --save-dev and nodemon index.js. It will make service up and running at port 3000. 

Below file is also containing cURL script to check things in postman.




Hope you have liked the way we present the things, please comment your views OR queries in comment section. Thanks. 


Post a Comment

0 Comments