Skip to content

Commit 00dfe23

Browse files
authored
changeset (#848)
1 parent c6ce2a2 commit 00dfe23

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: .changeset/two-walls-doubt.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@vercel/blob': major
3+
---
4+
5+
Vercel Blob is now GA! To celebrate this we're releasing the `1.0.0` version of the Vercel Blob SDK which includes multiple changes and improvements.
6+
7+
Changes:
8+
- `addRandomSuffix` is now false by default
9+
- Blobs are cached for one month, configurable and with a lower limit of 1 min. Which means you cannot configure the blob cache to be less than 1 minute.
10+
- Random suffixes are now also added to the `pathname` of blob responses and `content-disposition` header.
11+
- Overwriting blobs now requires to use `allowOverwrite: true`. Example:
12+
13+
```js
14+
await put('file.png', file, { access: 'public' });
15+
16+
await put('file.png', file, { access: 'public' }); // This will throw
17+
18+
put('file.png', file, { access: 'public', allowOverwrite: true }); // This will work
19+
```
20+
21+
How to upgrade:
22+
- If you're using random suffixes by default, then add `addRandomSuffix: true` to `put` and `onBeforeGenerateToken` options.
23+
- If you're overwriting blobs, then add `allowOverwrite: true` to `put` and `onBeforeGenerateToken` options.
24+
- If you're using a cache-control of less than one minute, we recommend using a Vercel Function instead of a Blob. As Vercel Blob is primarily designed for caching content for a longer time.
25+
- If you're displaying the `pathname` field of Blob responses in a UI, and using random suffixes, make sure you adpat the UI to show the longer `pathname`.

0 commit comments

Comments
 (0)