Skip to content

Appending files is not working after [email protected] #14

@DanielRamosAcosta

Description

@DanielRamosAcosta

Hello! I'm getting a weird error when trying to add files to a form.

I've created a library similar to supertest called tepper, and the other day the bot tried to upgrade formdata-node from 4.3.2 to 4.4.1. The CI of the PR was failing, and I've been trying to narrow up the error.

Finally, I've managed to reproduce the error in this separate repository: DanielRamosAcosta/form-data-issue. The CI is passing on the main branch, but it is failing after upgrade, as you can see in this PR.

Output at 4.3.2:

--form-data-boundary-xxxxxxxxxxxxxxxx
Content-Disposition: form-data; name="stream"; filename="file.txt"
Content-Type: text/plain

Stream content
--form-data-boundary-xxxxxxxxxxxxxxxx--

Output at 4.4.1

--form-data-boundary-xxxxxxxxxxxxxxxx
Content-Disposition: form-data; name="stream"

[object File]
--form-data-boundary-xxxxxxxxxxxxxxxx--

There seems to be a problem with the File detection at 4.4.1! No more time today, but I could give a try reproducing the error at this repo and providing a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions