How to run curl command for Azure REST API with comp=range

Nguyen Thien 0 Reputation points
2023-06-14T19:03:05.5266667+00:00

Curl command: curl -i -X PUT "https://zzzstorage.blob.core.windows.net:443/test2/observation/test.json?comp=range&<SAS token" -H "Content-Length: 183999" -H "x-ms-range: bytes=0-183998" -H "x-ms-date: Wed, 14 Jun 2023 18:49:0 GMT" -H "x-ms-write: update" --data test.json

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
{count} votes

2 answers

Sort by: Most helpful
  1. David Chou (周彥江) 0 Reputation points
    2023-09-26T02:12:10.3666667+00:00

    My file share successful experience for your reference:

    $ curl -i -X PUT "https://storage1657.file.core.windows.net/test2/observation/test-1-min-obs-2023-02-28-144253.json?<SAS key>" -H "x-ms-content-length: 183999" -H "Content-Length: 0" -H "x-ms-type: file" -H "x-ms-version: 2023-08-03"

    $ curl -i -X PUT "https://storage1657.file.core.windows.net/test2/observation/test-1-min-obs-2023-02-28-144253.json?<SAS key>&comp=range" -H "x-ms-write: update" -H "x-ms-range: bytes=0-183998" -H "x-ms-version: 2023-08-03" --upload-file "1-min-obs-2023-02-28-144253.json"

    0 comments No comments

  2. Reddy Bhaskar Vengala 0 Reputation points
    2023-10-17T18:56:26.9766667+00:00

    Hi David,

    I am trying to access file share folder using SAS link from browser/postman, but it is giving below error. ( SAS link is working fine for individual files inside file share folder)

    "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature"

    Could you please help on this.

    thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.