-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(blob): Ensure contentType always has a value in blob results (#803)
* feat(blob): Ensure contentType always has a value in blob results Before this commit, when using extension less pathnames or unknown extensions (like wxss) then: - Errors would be imprecise ("contentType is not allowed", empty string issue) - When creating blobs, contentType would be undefined Once you upgrade: - We will default to 'application/octet-stream' when we can't find a correct mime type from extension or no extension in pathname - Errors will be precise ("contentType 'application/octet-stream' is not allowed) - contentType is always present on put/upload/copy This is a BREAKING CHANGE if you were used to do something like: ```js if (contentType === undefined) { // do something } ``` * changeset * fix tests
- Loading branch information
Showing
6 changed files
with
18 additions
and
13 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,5 @@ | ||
--- | ||
'@vercel/blob': minor | ||
--- | ||
|
||
contentType default is now 'application/octet-stream' instead of `undefined` |
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
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