Categories
Node JS

Node js – Azure blob storage generate temporary public url for private file.

This article demonstrates how to generate a temporary public URL to access a private file which resides inside the Azure blob storage which has private access.

We gonna use NodeJS and Azure’s official npm module to generate a temporary public URL for a private file using shared access signatures (SAS).

Let’s create a directory called AzureBlogTest and Initiate the project with,npm init --yes it will create a file namedpackage.json inside the current directory. Now install the project dependency with npm install azure-storage

After installing decency, let’s create a file namedserver.js and place below code in it.

Now run the code with node server.js command, in the console you will get Azure Blob URL.

By Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.

1 reply on “Node js – Azure blob storage generate temporary public url for private file.”

Leave a Reply

Your email address will not be published. Required fields are marked *