Home > Enterprise >  Azure storage account container name format is incorrect
Azure storage account container name format is incorrect

Time:05-06

I'm trying to read a json file from storage account from a container name, the container name is (relative path )

var-storage/business/web/

file name is :

test.json

when I try my code :

blobService.getBlobToText(container, blobname, function(error, text){

if(error){

    console.error(error);

    res.status(500).send('Fail to download blob');

} else {

   var data = JSON.parse(text);

   res.status(200).send('Filtered Data you want to send back');

}

});

it gives me this error :

container name format is incorrect

can you help please ?

CodePudding user response:

To fix this issue, please change your container name variable to var-storage and your blob name variable to business/web/test.json and you should not get the error.

To elaborate more, in Azure Blob Storage the folders are virtual and are essentially part of the blob's name.

  • Related