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.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status