Skip to content
Dashboard

Vercel Blob now supports consistent reads on private storage

Software Engineer
import { put, get } from '@vercel/blob';
await put('reports/latest.json', JSON.stringify(report), {
access: 'private',
});
// New blobs are read-after-write consistent: this read reflects the fresh write
let result = await get('reports/latest.json', { access: 'private' });
// Overwrite the report at the same pathname
await put('reports/latest.json', JSON.stringify(updatedReport), {
access: 'private',
allowOverwrite: true,
});
// A default read can return the previous version for up to 60 seconds.
// A consistent read is guaranteed to reflect the update:
result = await get('reports/latest.json', {
access: 'private',
useCache: false,
});

curl "https://<store-id>.private.blob.vercel-storage.com/file.json?cache=0" \
-H "Authorization: Bearer $BLOB_READ_WRITE_TOKEN"

npm install @vercel/blob@2.6.1

Ready to deploy?