`az storage blob upload-batch`: cannot upload directories to $root container
See original GitHub issueEnvironment summary
OS: macOS 10.13 CLI version: 2.0.20 via Homebrew Shell: zsh
I’m attempting to upload a directory with sub directories to the root container using this syntax:
az storage blob upload-batch -d 'https://MY_STORAGE_ACCOUNT.blob.core.windows.net/$root' -s build
I get the following error when it attempts to upload the first sub directory and the command fails:
The requested URI does not represent any resource on the server.
I have tried using other syntax variants such as the one below and I get the same error:
az storage blob upload-batch -d '$root' -s build --account-name MY_STORAGE_ACCOUNT
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to upload a folder to Blob Storage? - azure - Stack Overflow
You can use upload-batch : az storage blob upload-batch --destination ContainerName --account-name YourAccountName --destination-path ...
Read more >Can't upload-batch to storage account - MSDN - Microsoft
The web service endpoint returns the index document in the requested directory for both the root and all sub directories. For more information, ......
Read more >Transferring file directory/folder to Azure Blob Storage with ...
You might have faced the issue that you cannot transfer a whole directory of files manually into a storage account in Azure UI....
Read more >How to host your static website in Azure Storage
I'm going to use Azure CLI to upload the content of my current terminal folder to blob storage using the following command: az...
Read more >[Solved]-How to upload a folder to Azure storage-C#
GetBlockBlobReference(cloudfileName); blob.UploadFromFile(file); }. Niels 1006. score:0. From the CLI you can use: az storage blob upload-batch.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am not able to upload directory content using
az storage file upload-batch
Below command is failing with mentiond issue. What is the share_name and what value need to provide for it?az storage file upload-batch --destination <Container-URL> --source <directory-name> --account-name <storage-account-name> --account-key <storage-account-key>
uploading <directory-path><file-name> share_name should not be None.@sethdeckard you can achieve this by combining the root container with non-root containers. e.g.
For example, use $root for your index file and have an ‘assets’ container then you can batch upload to that assets container. If you need more subdirectories under assets, the files in that container can use slashes (‘sub_dir/example.ts’ would be the file name for example).