Endpoint
Authentication
This endpoint requires theBLOB_READ_WRITE_TOKEN environment variable to be configured on the server.
Request
Headers
The desired filename for the uploaded file
The MIME type of the file being uploaded (e.g.,
image/png, image/jpeg)Body
The request body should be the raw file content (binary data).Response
The public URL where the uploaded file can be accessed
Alternative download URL for the file
The path of the file in Vercel Blob storage
The content type of the uploaded file
Content disposition header value
Examples
Upload an image
Response example
Error responses
Missing token
401 Unauthorized
Implementation details
The upload endpoint:- Runs on Vercel’s Edge Runtime for optimal performance
- Uses Vercel Blob storage with public access
- Automatically constructs filenames based on content type
- Returns immediately with the public URL
Files uploaded through this endpoint are publicly accessible. Do not upload sensitive information.
Use cases
- Editor images: Upload images pasted or dropped into the rich text editor
- Profile pictures: Store user avatar images
- Note attachments: Upload files to include in notes
- Media embeds: Host images and media for embedding
See also
Rich text editor
Learn how the editor uses this endpoint for image uploads
Environment variables
Configure BLOB_READ_WRITE_TOKEN