Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure Blob and File
type
are included in FormData
When appending a Blob-like or File-like object to FormData, the item is wrapped in a `File` object. But this was causing any options, such as `type` to be hidden in the wrapped type and not exposed at the top level. This fix copies the approach used in `formdata-polyfill` and so also `node-fetch` where the wrapped object is also passed as the `options` argument when creating a new `File` object. Fixes cloudflare/workers-sdk#1085
- Loading branch information
1 parent
fab1e8b
commit a7669df
Showing
2 changed files
with
10 additions
and
7 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
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