-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(blob): allow folder creation (#559)
This change allows the creation of empty folders. Before the SDK would always require a body, which is prohibited by the API.
- Loading branch information
Showing
4 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
"@vercel/blob": patch | ||
"vercel-storage-integration-test-suite": patch | ||
--- | ||
|
||
feat(blob): allow folder creation | ||
|
||
This allows the creation of empty folders in the blob store. Before this change the SDK would always require a body, which is prohibited by the API. | ||
Now the the SDK validates if the operation is a folder creation by checking if the pathname ends with a trailling slash. | ||
|
||
```ts | ||
const blob = await vercelBlob.put('folder/', { | ||
access: 'public', | ||
addRandomSuffix: false, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd1781f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vercel-storage-next-integration-test-suite – ./
vercel-storage-next-integration-test-suite-curated-tests.vercel.app
storage-rho.vercel.app
vercel-storage-next-integration-test-s-git-14bcac-curated-tests.vercel.app