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

TypeError: Cannot read property 'split' of undefined when header missing filename #10

Open
kajann opened this issue Nov 10, 2017 · 2 comments

Comments

@kajann
Copy link

kajann commented Nov 10, 2017

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

@yosephmi
Copy link

having a similar issue, although i am missing the "name" attribute of the "content-disposition"
Was this ever resolved?

@TomTom0815
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants