.set
method with File
from FormData
differs in behavior from Node.js (file name is lost)
#12325
Labels
bug
Something isn't working
What version of Bun is running?
1.1.17+bb66bba1b
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
I came across this when I was uploading files to Telegram using GramIO. I am sure that this is reproduced in other cases.
The fact is that when I fill in the
FormData
using the.set
method, the filename is lost when uploading to Telegram, although inNode.js
everything works as expected...If you try to run this option through
Node.js
, both options will send a file with the specified name, but if you run it throughBun
, then there will be only second file with the correct name (where it wasFormData.append
used)Verbose logs where
.set
used (wrong filename)Verbose logs where
.append
usedas we can see
Content-Length
differsBecause of this, file uploads to GramIO didn't work correctly for a long time, but I'm glad to get to the truth!
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: