Vercel Blob 私有存储,现已推出公共测试版

来源: Vercel News

原文

Vercel Blob now supports private storage for sensitive files like contracts, invoices, and internal reports. Private storage requires authentication for all operations, preventing exposure via public URLs.

Public storage allows public reads for media assets, while private storage requires authentication.

Create a private store via the Storage dashboard or with the CLI:

CLI command

When created inside a linked Vercel project, the CLI prompts you to connect the store, automatically adding the BLOB_READ_WRITE_TOKEN environment variable. The SDK uses this variable to authenticate operations in your deployments.

SDK installation

To upload, use put or upload with the access: 'private' option.

Upload example

To download, use the get method to stream files.

Retrieval example

Private storage is in beta on all plans with standard Vercel Blob pricing.

Learn more about private storage.

Read more