Open kajann opened 7 years ago
having a similar issue, although i am missing the "name" attribute of the "content-disposition" Was this ever resolved?
I can confirm this bug. (it hits me right now, very badly) I pass a file and a key-value pair through a HTML form and this library throws an TypeError
Exception has occurred: TypeError: Cannot read properties of undefined (reading 'split')
Here is what happens:
The process
function (line 20) expects a header sting that consists of 3 parts seperated by a semicolon.
This leads to a function call of obj
function with a undefined
as str value - when parsing the key-value (and not the file)
Content-Disposition is missing the filename, which is optional, so it must be handled properly --4ef20bdd-c5ba-482d-a7e9-8b06be43a9e1 content-disposition: form-data; name="data" Content-Type: image/png Content-Length: 221417