How to upload files to static website blob storage with REST

IJustWantToReadDocs 21 Reputation points
2020-10-12T15:12:00.597+00:00

I would like to be able to upload to my static website blob storage an index.html using REST API. When I look at the network tab of my browser while uploading in the GUI I see

Request URL: https://richgstorage1.blob.core.windows.net/$web/index.html?sv=2019-12-12&ss=bqtf&srt=sco&sp=rwdlacuptfx&se=2020-10-12T20:24:58Z&sig=c1RflRPbJiaph2xBsUYUsYw0ycNI0E5yNU7%2Bc%2FuKatI%3D&_=1602505622748
Request Method: PUT
Status Code: 201 Created
Access-Control-Expose-Headers: x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-content-crc64,Content-MD5,Last-Modified,ETag,x-ms-request-server-encrypted,Content-Length,Date,Transfer-Encoding
x-ms-blob-content-type: text/html
x-ms-blob-type: BlockBlob
<html><body>Static Website 2 f12</body></html>

But how can I do something like that with curl for example? I don't want to use a library such as powershell or cli.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,511 questions
{count} votes

Accepted answer
  1. Sumarigo-MSFT 44,251 Reputation points Microsoft Employee
    2020-10-16T09:33:56.823+00:00

    @IJustWantToReadDocs Thanks for raising this question! Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.
    You can upload file to $web container the same way as you upload any file to azure storage. When using blob endpoint to upload content, there’s no difference uploading to $web container from any other user containers.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    -----------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful