unstale

npm / @vercel/blob

@vercel/blob

What changed in @vercel/blob 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

9 breaking1 security3 deprecations18 new APIs and options3 behavior and defaults6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@vercel/blob 234 changes

Breaking changes 4

  • Image optimization through put or putFromUrl requires OIDC authentication.

    2.7.0release notes

  • A blank request-context header now resolves to no token rather than falling back to VERCEL_OIDC_TOKEN.

    2.4.1release notes

  • When ifMatch is set through onBeforeGenerateToken or direct token generation, allowOverwrite is implicitly enabled; explicitly setting allowOverwrite to false throws a clear error.

    2.3.2release notes

  • Client Uploads no longer infer callbackUrl from the browser’s location. When not hosted on Vercel, provide it in the object returned by onBeforeGenerateToken; on Vercel it is inferred from system environment variables.

    2.0.0release notes

Security 1

  • Validates the URL domain in get() to prevent sending the token to arbitrary hosts.

    2.3.1release notes

Deprecations 3

  • The optimizeImage option on put is deprecated in favor of putImage, but continues to work.

    2.8.0release notes

  • The putFromUrl function is deprecated in favor of putImage, but continues to work.

    2.8.0release notes

  • The useCache option is still accepted but ignored; reads always use the standard caching path. It will be removed in a future major version.

    2.5.0release notes

New APIs and options 17

  • Add setTtl(urlOrPathname, { ttlDays }) to change or clear a blob's TTL, including batch updates of up to 1,000 URLs; failed updates return error entries.

    2.9.0release notes

  • Add ttlDays to put, putImage, putFromUrl, copy, rename, createMultipartUpload, client tokens, and presigned URLs. TTLs range from 1 to 730 days and incur an additional Advanced Operation per started 60 days.

    2.9.0release notes

  • Adds an API that optimizes image content or a public image URL and stores only the optimized output. Its options mirror put plus required width, quality, and format parameters.

    2.8.0release notes

  • The put option optimizes an image through Vercel Image Optimization before storing it; only the optimized output is stored.

    2.7.0release notes

  • Adds a method that optimizes an image through Vercel Image Optimization before storing it; only the optimized output is stored.

    2.7.0release notes

  • Adds useCache for get operations; setting it to false adds cache=0 to bypass the CDN cache for private blobs and read the latest content from origin storage.

    2.6.1release notes

  • Adds an API to move a blob to another pathname by copying it and then deleting the source. Overwriting is disabled by default; the API requires a read-write token.

    2.6.0release notes

  • Adds presigned URLs.

    2.4.0release notes

  • Adds Vercel OIDC authentication.

    2.4.0release notes

  • Fetch blob content by URL or pathname; returns a ReadableStream and blob metadata.

    2.3.0release notes

  • Pass a previously received ETag to get(); if the blob has not changed, it returns statusCode: 304 with stream: null, avoiding an unnecessary re-download.

    2.3.0release notes

  • Blobs can be uploaded and read privately by setting access: 'private' on put() and get(); private blobs require authentication and are not publicly accessible via their URL.

    2.3.0release notes

  • Adds the ifMatch option for conditional deletes using optimistic concurrency control; it works only for single-URL deletes.

    2.2.0release notes

  • Adds an error for ETag mismatches when a conditional write fails with HTTP 412.

    2.1.0release notes

  • Blob responses from put, copy, head, list, and multipart now return an etag, which can be used for conditional writes.

    2.1.0release notes

  • Accepts an ifMatch option to perform a conditional write only if the blob's current ETag matches the supplied value.

    2.1.0release notes

  • Set this environment variable to your tunnel URL for local development so Client Uploads can reach the callback.

    2.0.0release notes

Behavior and default changes 3

  • put, putImage, copy, rename, and completeMultipartUpload return expiresAt for blobs written with ttlDays; head() also returns the scheduled expiresAt.

    2.9.0release notes

  • get() now accepts blob URLs from the same origin as VERCEL_BLOB_API_URL or NEXT_PUBLIC_VERCEL_BLOB_API_URL when either is set; without an override, arbitrary hosts remain rejected.

    2.8.1release notes

  • The package now uses the refreshing OIDC token getter, refreshing expired tokens in development; if refresh fails, callers fall back to BLOB_READ_WRITE_TOKEN.

    2.5.0release notes

Fixes and other changes 6

  • Blob pathnames containing . or .. segments are read as written, fixing head, copy, rename, del and list for those blobs.

    2.8.2release notes

  • Restores the useCache option. Setting it to false bypasses the CDN cache and serves the blob from origin storage; it defaults to true.

    2.6.0release notes

  • The transform stream no longer bypasses backpressure due to incorrect queueMicrotask wrapping.

    2.3.3release notes

  • Multipart uploads no longer hang forever on empty streams.

    2.3.3release notes

  • Known-size Blob, File, and Buffer bodies are checked client-side before multipart uploads start, avoiding wasted API calls.

    2.3.3release notes

  • On put(), ifMatch now implicitly enables allowOverwrite, avoiding conflicting conditional headers to S3; explicitly setting allowOverwrite to false with ifMatch throws a clear error.

    2.3.2release notes

@vercel/blob 16 changes

Breaking changes 5

  • addRandomSuffix is now false by default; set it to true in put and onBeforeGenerateToken options if you rely on random suffixes.

    1.0.0release notes

  • Set allowOverwrite: true in put and onBeforeGenerateToken options to overwrite blobs; overwriting without it throws.

    1.0.0release notes

  • Blob cache duration cannot be configured to less than one minute.

    1.0.0release notes

  • Random suffixes are now also added to the content-disposition header.

    1.0.0release notes

  • Random suffixes are now added to the pathname of blob responses, so UIs displaying it may need to accommodate longer values.

    1.0.0release notes

New APIs and options 1

  • Blobs are cached for one month by default, and the cache duration is configurable.

    1.0.0release notes