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
* [blob] add private blobs
* browser
* changeset
* bypass
* latest
* main
* remove live tests
* multi part tests
* add get by blob
* update blob with streams
* add access type
* allow download urls and simplify typing
* update
* update
* feat(blob): add raw headers to get() response
Add headers property to GetBlobResult interface, returning the raw
Headers object from the fetch response for accessing additional
metadata like ETag or x-vercel-* headers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(blob): add optional headers option to get()
Allow passing additional headers to the fetch request via an optional
headers option. Documented as an advanced feature since most users
won't need it. The authorization header is always set automatically.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ensure createFolder requires access property now, it's a write like put
* [blob] feat: add useCache option to bypass CDN cache (#954)
* [blob] feat: add useCache option to bypass content-cache
Add a `useCache` option to `blob.get()` that controls whether to use
the content-cache layer:
- `useCache: true` (default) = normal caching behavior
- `useCache: false` = appends ?cache=0 to bypass cache
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: clarify useCache only works for private blobs
* Apply suggestion from @vvo
* docs: use opaque terminology for cache (edge cache vs origin storage)
* docs: use CDN cache terminology
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* add tests for private, fix method
* update
* update
* fix(blob): add etag to get() response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* update
* update
* update ts docs
* conditional gets
* add conditional reads
* changeset
* update
---------
Co-authored-by: Shawn Feldman <shawn.feldman@vercel.com>
Co-authored-by: Vincent Voyer <vincent@codeagain.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add private storage support (beta), a new `get()` method, and conditional gets
6
+
7
+
**Private storage (beta)**
8
+
9
+
You can now upload and read private blobs by setting `access: 'private'` on `put()` and `get()`. Private blobs require authentication to access — they are not publicly accessible via their URL.
10
+
11
+
**New `get()` method**
12
+
13
+
Fetch blob content by URL or pathname. Returns a `ReadableStream` along with blob metadata (url, pathname, contentType, size, etag, etc.).
14
+
15
+
**Conditional gets with `ifNoneMatch`**
16
+
17
+
Pass an `ifNoneMatch` option to `get()` with a previously received ETag. When the blob hasn't changed, the response returns `statusCode: 304` with `stream: null`, avoiding unnecessary re-downloads.
* - access - (Required) Must be 'public' as blobs are publicly accessible.
106
+
* - access - (Required) Must be 'public' or 'private'. Public blobs are accessible via URL, private blobs require authentication.
101
107
* - token - (Required) A client token generated by your server using the generateClientTokenFromReadWriteToken method.
102
108
* - contentType - (Optional) The media type for the blob. By default, it's derived from the pathname.
103
109
* - 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.
@@ -121,7 +127,7 @@ export type ClientCreateMultipartUploadCommandOptions =
121
127
*
122
128
* @param pathname - A string specifying the path inside the blob store. This will be the base value of the return URL and includes the filename and extension.
* @param pathname - A string specifying the path inside the blob store. This will be the base value of the return URL and includes the filename and extension.
* - access - (Required) Must be 'public' as blobs are publicly accessible.
150
+
* - access - (Required) Must be 'public' or 'private'. Public blobs are accessible via URL, private blobs require authentication.
145
151
* - token - (Required) A client token generated by your server using the generateClientTokenFromReadWriteToken method.
146
152
* - contentType - (Optional) The media type for the file. If not specified, it's derived from the file extension.
147
153
* - abortSignal - (Optional) AbortSignal to cancel the operation.
@@ -174,7 +180,7 @@ type ClientMultipartUploadCommandOptions = ClientCommonCreateBlobOptions &
174
180
* @param pathname - Same value as the pathname parameter passed to createMultipartUpload. This will influence the final URL of your blob.
175
181
* @param body - A blob object as ReadableStream, String, ArrayBuffer or Blob based on these supported body types. Each part must be a minimum of 5MB, except the last one which can be smaller.
* - access - (Required) Must be 'public' as blobs are publicly accessible.
183
+
* - access - (Required) Must be 'public' or 'private'. Public blobs are accessible via URL, private blobs require authentication.
178
184
* - token - (Required) A client token generated by your server using the generateClientTokenFromReadWriteToken method.
179
185
* - uploadId - (Required) A string returned from createMultipartUpload which identifies the multipart upload.
180
186
* - key - (Required) A string returned from createMultipartUpload which identifies the blob object.
@@ -205,7 +211,7 @@ type ClientCompleteMultipartUploadCommandOptions =
205
211
* @param pathname - Same value as the pathname parameter passed to createMultipartUpload.
206
212
* @param parts - An array containing all the uploaded parts information from previous uploadPart calls. Each part must have properties etag and partNumber.
* - access - (Required) Must be 'public' as blobs are publicly accessible.
265
+
* - access - (Required) Must be 'public' or 'private'. Public blobs are accessible via URL, private blobs require authentication.
260
266
* - handleUploadUrl - (Required) A string specifying the route to call for generating client tokens for client uploads.
261
267
* - clientPayload - (Optional) A string to be sent to your handleUpload server code. Example use-case: attaching the post id an image relates to.
262
268
* - headers - (Optional) An object containing custom headers to be sent with the request to your handleUpload route. Example use-case: sending Authorization headers.
0 commit comments