Making blob storage public and uploading to it

Viewed 1396

Trying to upload to a blob storage using curl command

curl --upload-file <file> --url "https://<storage-account-name>.blob.core.windows.net/<container-name>/<file>"

But keep getting 'HTTP/1.1 404 The specified resource does not exist'. I made both the storage and the container public, container's access level is set to 'container', not sure what else to try. Am I missing something?

2 Answers

Generating a SAS token with write access and adding x-ms-blob-type header worked. Here's curl command

curl -H "x-ms-blob-type: BlockBlob" --upload-file <file-name> --url "https://<account-name>.blob.core.windows.net/<container-name>/<file-name>?<SAS-token>"
Related