azureazure-blob-storageazure-sdkazure-sdk-js

Azure node sdk blob folder upload similar to cli upload-batch


In azure cli the command

az storage blob upload-batch --source <source folder> --destination-path <destination path> --destination <destination>

is it available the same api in the javascript sdk @azure/storage-blob or in another package?

Thank you!


Solution

  • AFAIK, this feature is not available in any SDK.

    If you are using @azure/storage-blob, you would need to list files in a folder yourself (using fs module) and then upload each file using uploadFile(string, BlockBlobParallelUploadOptions) method which is what az storage blob upload-batch is doing.