locked
Presigned URLs for storage operation RRS feed

  • Question

  • Seems like there is no support to generate Presigned URLs for BLOB operations?

    Take AWS S3 for example. If I want to upload a large file to S3. I can use the SDK to generate a presigned url to allow client to directly upload to my S3 bucket. Sample python code shown below

    var params = {Bucket: 'bucket', Key: 'key'};
    s3.getSignedUrl('putObject', params, function (err, url) {
      console.log('The presigned URL is', url);
    });

    Then, in the client side, I can use the above url to PUT directly into my S3 bucket

    I cannot find similar API for Azure storage. Am I missing anything in to documentation or should this be a new feature request?

    Thanks



    Friday, May 8, 2020 4:12 PM

All replies

  • Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. 

    Are you referring to SAS token? In your scenario SAS could belp in both the sides to upload and download If so Delegate access with a shared access signature, Please refer to this article and let me know the status. 

    Hope this helps! 

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

    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members

    Monday, May 11, 2020 1:38 PM
  • Hi Sumanth,

    Thanks for the reply. I read the article you provided and also found this example on Microsoft docs:https://docs.microsoft.com/en-us/rest/api/storageservices/service-sas-examples

    I used the above example to try to upload to Azure storage. But it keeps giving me below error:

    <?xml version="1.0" encoding="utf-8"?>
    <Error>
      <Code>MissingRequiredHeader</Code>
      <Message>An HTTP header that&apos;s mandatory for this request is not specified.
    RequestId:48f6e1de-301e-0057-21a7-27f136000000
    Time:2020-05-11T15:15:38.4179599Z</Message>
      <HeaderName>x-ms-blob-type</HeaderName>
    </Error>

    It seems like the above example needs to be updated. Do we need to add any header to the PUT request even if we are using SAS?

    Thanks

    Monday, May 11, 2020 3:21 PM
  • Joey Liu-Dev

    We need to pass SAS token. It should be added to URL later on during URL creation 

    You may refer to this article: https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob 

     Based on the error message you may also refer to this GitHub link: https://github.com/Azure/azure-storage-node/issues/26

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

    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members

    Friday, May 15, 2020 6:31 AM
  •  Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Wednesday, May 20, 2020 6:11 PM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Wednesday, May 27, 2020 7:59 AM