You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(blob): Add support for custom headers in client upload method
6
+
7
+
This change adds the ability to pass custom headers to the `upload` method in the client, which will be forwarded to the server endpoint specified by `handleUploadUrl`. This is particularly useful for sending authorization headers and solves issues like [#796](https://github.com/vercel/storage/issues/796) and [#420](https://github.com/vercel/storage/issues/420).
* - access - (Required) Must be 'public' as blobs are publicly accessible.
256
261
* - handleUploadUrl - (Required) A string specifying the route to call for generating client tokens for client uploads.
257
262
* - clientPayload - (Optional) A string to be sent to your handleUpload server code. Example use-case: attaching the post id an image relates to.
263
+
* - headers - (Optional) An object containing custom headers to be sent with the request to your handleUpload route. Example use-case: sending Authorization headers.
258
264
* - contentType - (Optional) A string indicating the media type. By default, it's extracted from the pathname's extension.
259
265
* - multipart - (Optional) Whether to use multipart upload for large files. It will split the file into multiple parts, upload them in parallel and retry failed parts.
260
266
* - abortSignal - (Optional) AbortSignal to cancel the operation.
0 commit comments