1
votes

I have an Azure node.js "App Service" already set up and running, working just fine. It's connected to an Azure DB, all that works great.

What I don't have is any sort of Storage / Blob service on my account whatsoever, and I'm having trouble finding documentation about the best way to set Blob Storage up to work with my App Service.

My goal is to be able to store and retrieve files, including primarily image files (.png, .jpg) and pdfs. I think Blob storage is what I'm looking for, and I'll want to set up an API on my node.js App Service for web clients to be able to upload and download files on the Storage service.

1
There is considerable documentation about using blob storage, including the REST API as well as the various language-specific SDKs built on top of it. There is no "best way" to use blob storage; that really depends on your app and your needs. Unfortunately, as written, this is really broad (and primarily opinion-soliciting). Please edit your question to be specific.David Makogon
I'm not asking about the best way to use it, I'm asking about if there are any workflows in Azure to set it up properly with an existing App Service. There are many situations where this question is relevant -- for example if you want to connect your App Service to an Azure SQL db, doing it one way rather than another way will be faster, more convenient, requiring little configuration. There are definitely recommended ways of connecting azure services to each other.TKoL

1 Answers

2
votes

There are 2 Azure Storage blob npm packages you can use and add to your project dependencies:

  1. azure-storage https://www.npmjs.com/package/azure-storage
  2. @azure/storage-blob https://www.npmjs.com/package/@azure/storage-blob

The 1st package is the most widely used azure-storage Node.js SDK. Supports blob/queue/file/table.

The 2nd package is the latest released package for blob, more lightweight and based on the latest Azure Storage architecture. Supports async methods, promise and HTTP pipeline injection.

You can go to their npm package or GitHub page for their samples.