Agent skill · upstash
upstash-blob-js
Work with the @upstash/blob TypeScript/JavaScript SDK for S3-compatible object storage with direct browser uploads, presigned URLs, multipart, and signed reads. Use when storing files or blobs, uploading avatars, images, videos, attachments or user documents, letting a browser upload straight to storage without proxying bytes through a server, generating public or time-limited signed URLs, serving private files, streaming large files with pause and resume, setting cache headers on stored objects, or reaching an S3-compatible bucket from the AWS SDK.
What it needs
About 6k tokens when loaded.
What this skill does
@upstash/blob SDK S3-compatible object storage. Bucket runs on your server; uploadHandler plus React hooks upload from the browser straight to storage so the bytes never pass through your app. Install & Setup Create a bucket in the console and set UPSTASHBLOBTOKEN. The token is a bearer secret for the whole bucket — keep it server side, never in NEXTPUBLIC or any bundler-inlined variable. A bucket is public (every object has a URL) or private (no URL; reads go through signedReadUrl). That is a console setting, not a client option — the SDK learns it from the backend. Writing Bodies: Request, Blob/File, ArrayBuffer, typed array, string, ReadableStream. A stream carries no length — pass size (exact, streams through) or maxSize (buffers up to the cap), or put throws lengthrequired. Option Default What it does -------- --------- -------------- contentType the body's, else application/octet-stream What the object is stored as contentTypes any Allow list, e.g. ["image/", "application/pdf"] maxSize none Refuse a bigger body with toolarge cache bucket default Cache-Control stored with the object metadata none x-amz-meta-; lowercase keys, printable ASCII values allowOverwrite true false refuses if something is there (alreadyexists) ifUnchanged none An etag; fails with conflict if it changed multipart '16mb' Threshold for going up in parts; true/false force it Sizes are decimal: '20mb' is 20,000,000 bytes. '5mib' throws. Use uniquePath for any value you don't control. Each ${} becomes one slugged filename that can never add a directory, and the finished path gets a random suffix — so two uploads of photo.png never collide. The literal parts of the template are passed through as written, so keep . and .. out of them yourself: a path with those segments is refused later, by the call that uses it, with a TypeError rather than a BlobError. bucket.copy(from, to, { contentType, cache, metadata }) and bucket.move(from, to, options) preserve source properties you omit. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills upstash/upstash-blob-js