Giter Site home page Giter Site logo

Comments (3)

michaeldeongreen avatar michaeldeongreen commented on May 29, 2024 1

@XiaoningLiu , thanks for your help. Based on your example, I was able to set custom http headers.

from azure-storage-js.

XiaoningLiu avatar XiaoningLiu commented on May 29, 2024

@michaeldeongreen

If you want to customize format of the client ids, like some prefixes or suffixes, you can do it with a new policy injected to the pipeline easily.

I created a wiki page demonstrate how to customize V10 storage SDK with pipeline and polices.
https://github.com/Azure/azure-storage-js/wiki/Customize-HTTP-Pipeline-and-Policies

If you want a customized requestID field in every request method's options, it's not supported by design.
I'd like to know is there any reason for you want to do this? But you always can create different BlockBlobURL objects with different pipelines assigned to achieve this feature.

from azure-storage-js.

michaeldeongreen avatar michaeldeongreen commented on May 29, 2024

@XiaoningLiu , this is a feature requested by our client.

  1. We will be using SDK 10 to upload to blob storage
  2. Before the upload starts, the app will call an Web API to get metadata info ie SAS, container name etc tec
  3. We would like a GUID to be apart of the metadata so we can set in the client-request-id
  4. Once the upload completes, many events and workflows will follow (ie EventGrid, durable functions etc etc)
  5. We would like to use the client-request-id as a means to track a unique id back to the original upload

I did some research over the weekend and saw:
BlobURL.setHTTPHeaders, but the client-request-id is not a header that can be set.

I also saw:
https://docs.microsoft.com/en-us/javascript/api/%40azure/storage-blob/blobsethttpheadersoptionalparams?view=azure-node-preview
https://docs.microsoft.com/en-us/javascript/api/%40azure/storage-blob/blobsethttpheadersheaders?view=azure-node-preview

But these objects are unavailable when you create a Blob via SAS Token.

I will look into a customized pipeline.

from azure-storage-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.