Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure Blob and File type are included in FormData #1467

Merged
merged 1 commit into from May 26, 2022

Commits on May 26, 2022

  1. 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
    petebacondarwin committed May 26, 2022
    Copy the full SHA
    5cc09aa View commit details
    Browse the repository at this point in the history