Skip to content

Can't put File objects in node.js #6588

@hencoappel

Description

@hencoappel

Describe the bug

Trying to use axios in our jest tests with the http adapter, openapi generated libraries are now requiring the use of JS File type objects, but when trying to PUT these the http adapter doesn't accept them, giving the error:

AxiosError: Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream

A file is just a blob with extra fields so the http adapter should be able to support this.

To Reproduce

No response

Code snippet

No response

Expected behavior

The library should support

Axios Version

1.7.7

Adapter Version

HTTP

Browser

No response

Browser Version

No response

Node.js Version

20.17

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions