vercel

storage

Vercel Storage - Blob and Edge Config

by vercel

TypeScript

TypeScript99.1%
JavaScript0.7%
CSS0.2%

Commit activity

Last 12 weeks · 11 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 6d ago
See all on GitHub →
kars85

What Lets client uploads choose their access level. 's callback can now return , bringing client uploads to parity with the server-side API. Fixes #1079. Why Private Blob shipped in #816, but only for server-side operations. The client-upload path ( → → ) was never given an knob, so every client-uploaded blob is forced to . 's return type is a that omits , and has no member to pick from — so returning is a TypeScript error with no runtime channel to carry the intent. Motivating use case: uploading receipts/documents containing PII/PHI directly from the browser — these should be private, but client uploads can currently only be public. Change Minimal and additive (): 1. Add optional to . 2. Add to the in 's return type. No runtime-logic change: already serializes all of its non- args into the signed client-token payload, and already spreads the result into it — so now flows end-to-end into the token payload automatically. When omitted, behavior is unchanged (public), so this is non-breaking. Tests Added to : bakes into the decoded token payload. The payload omits when it isn't provided (unchanged default). threads from into the minted client token. Locally: → 160 passed → passed () → clean Changeset included (). Open question for maintainers 🔎 I could only verify the SDK side. Does the control-plane / api-storage already honor an field embedded in a token payload, or is backend work needed for it to take effect? If the backend currently ignores token-level , this type change would let developers express private client uploads without them actually being private — so I'm flagging it rather than assuming. Happy to gate it, wire it differently, or hold the SDK change until the backend consumes the token — whatever matches how you'd like this to land. 🤖 Generated with Claude Code https://claude.ai/code/session_014yndSRPZ2WRRFJajNWX1F1

kars85 · 4d ago
falcoagustin

Problem There is no way to make a blob expire. Temp uploads, exports and previews stay until someone deletes them. Design: Blob TTL for objects. Server side: vercel/api#92860. Solution Adds (integer 1 to 30) to , , , , and . It is sent as the header, embedded in client tokens from and , and signed into presigned put URLs as . Browser-side and reject it, same as , so only the server decides the TTL. returns as a when the blob has a TTL. Why:** Blob had no expiry. This lets a write say how long the object should live, and the API tags it so S3 lifecycle rules delete it. Copies and renames never inherit the source TTL, so promoting a temp upload to its final path is just a copy or rename without . Requires the API change to be deployed and the team flag to be on; otherwise the API returns 400. 🤖 Generated with Claude Code

falcoagustin · 6d ago
falcoagustin

Problem Blob is getting an S3-compatible API (vercel/api#90518). S3 SDKs authenticate with an access key + secret, and we want the same zero-config DX as from : no static keys, credentials derived from the deployment's OIDC identity and refreshed automatically. Read-write tokens are deliberately not accepted as S3 credentials. Solution New subpath export : returns a provider function for the AWS SDK's option. Each call exchanges the Vercel OIDC token ( or the option, plus or ) for temporary credentials through the new endpoint. It throws a clear error when no OIDC token is available, even if a read-write token is. Options: , (scope) and (default 1 h, max 7 days). for a single credential set (for non-JS S3 clients). The result also carries , and so callers can configure a client without looking anything up. No new dependencies; the credential type is structural so stays out of the package. README documents the flow. 🤖 Generated with Claude Code

falcoagustin · 6d ago
falcoagustin

Why At API v13 the server reads keys containing or path segments exactly as written, instead of resolving them per RFC 3986 and looking up the wrong key (vercel/api#95790). This sends 13, which is what makes that reachable for , , , and . Production over 30 days: 164 requests failed for this reason; one succeeded because the normalization happened to land on a real key, and that one will start failing. is deliberately unchanged. It fetches the blob host directly, so the pathname is the URL path and resolves it before the request exists — fixing that means replacing the transport, too much risk for the size of the problem. Last commit removes an unused import in and an unused function in . Both are dead on and fail , which blocks this PR; unrelated otherwise. Merge after vercel/api#95790 deploys, or v13 requests hit a server that still resolves.

falcoagustin · 6d ago
falcoagustin

Problem rejects any URL whose hostname isn't . That check was added as an SSRF guard, but it also blocks local emulation: both (blob support) and serve blob content from their own host, so throws before any request is made. Every other command (, , , ) already works against an emulator because they route through . Raised by @scotttrinh in #help-cdn while adding Blob coverage to (#278) for the upcoming Python and Go SDKs. Solution now also accepts URLs on the same origin as a / override. With no override set, nothing changes — arbitrary hosts, subdomain spoofing and plain are all still rejected, so production behavior and the SSRF guard are untouched. Two things stay as they are, both because the SDK can't know an emulator's URL layout: Pathname input still builds a production store URL. Emulator users pass the URL returned by /, which is what already resolves on its side. For an emulator URL, keeps the emulator's route prefix (, not ), since it's derived from the URL path. Why:** You couldn't read a blob back when pointing the SDK at a local emulator — writes worked, reads threw "the URL does not point to a Vercel Blob store". Now, if you've explicitly told the SDK where its API lives, reads from that same host are allowed too, which is what unblocks and keeps the Python SDK from having to hardcode the hostname check. No feature flag: this is an npm SDK, and the change is self-gating — it only takes effect when is set, which is already an opt-in for non-production use. Rollback is a version revert. 🤖 Generated with Claude Code

falcoagustin · 2w ago
Structured data for AI agents

Repository: vercel/storage. Description: Vercel Storage - Blob and Edge Config Stars: 599, Forks: 102. Primary language: TypeScript. Languages: TypeScript (99.1%), JavaScript (0.7%), CSS (0.2%). License: Apache-2.0. Homepage: https://vercel.com/docs/storage Topics: blob, config, edge, edge-config, serverless. Latest release: @vercel/blob@2.8.2 (6d ago). Open PRs: 21, open issues: 45. Last activity: 6d ago. Community health: 50%. Top contributors: renovate[bot], github-actions[bot], vvo, dferber90, luismeyer, correttojs, AndyBitz, falcoagustin, elliott-with-the-longest-name-on-github, lukahartwig and others.