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.

5 2 votes
Article Rating
Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
2 years ago

Thank you! Protection Status
Would love your thoughts, please comment.x