I got most of the code from the NodeJS Blob quickstart from azure, I am able to upload files including images successfully and I can see them in the azure storage dashboard just fine. But I can't seem to download them or get a URL to them and I need the url for my database so I can query it and use the url to retrieve the file.
The download part of the code in the quickstart isnt so clear to me, it seems to be made for text as the upload is as well. If I go into my azure storage dashboard I can see the container and I can see the blob created with the image and I can click on the image and it loads in another page. However if I go to properties and select the Uri: https://facerstorage.blob.core.windows.net/a00008/sun.png
and paste it into my browser I get :
And I also print out the url returned from the blockBlobURL and it is the same as the one in the Uri in the blobs dashboard above, althought it has a '/./' between a0009 and sun.png which gets removed by the browser for example: https://facerstorage.blob.core.windows.net/a00009/./sun.png" its the same and I get the same error.
Not sure what is wrong here
I used the code from the nodejs blobs quickstart the code for the download is as follows:
const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, content);
console.log("The blobs URL is: " + JSON.stringify(blockBlobURL.url));
const downloadResponse = await blockBlobURL.download(aborter, 0);
downloadedContent = downloadResponse.readableStreamBody.read(content.length)//.toString();
console.log(`Downloaded blob content: "${downloadedContent}"`);
I dont have the code for the BlockBlobURL.download function, nor do I understand what:
const downloadResponse = await blockBlobURL.download(aborter, 0);
downloadedContent = downloadResponse.readableStreamBody.read(content.length)//.toString();
is doing.
I think that from the url above those I should already be able to access the image from that url but I get the errors as shown above. Don't know exactly what else these 2 do.
Thanks for any help.