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

Crashes when the multipart request is empty. And crashes the node instance. #6

Closed
mbisono opened this issue Apr 29, 2016 · 3 comments
Closed

Comments

@mbisono
Copy link

mbisono commented Apr 29, 2016

Can be replicated by launching a rest client like Advanced REST client and trying to upload a file without selecting one.

6:57:30 PM web.1 | events.js:85
6:57:30 PM web.1 | throw er; // Unhandled 'error' event
6:57:30 PM web.1 | ^
6:57:30 PM web.1 | Error: Unexpected end of multipart data
6:57:30 PM web.1 | at /Users/xxxxxx/Documents/workspace2/node-tickets/node_modules/dicer/lib/Dicer.js:62:28
6:57:30 PM web.1 | at process._tickCallback (node.js:355:11)

@richardgirges
Copy link
Owner

@mbisono I'm trying to reproduce - can you show me your express request handler code?

@mbisono
Copy link
Author

mbisono commented Aug 25, 2016

Hi,
I'm no longer using express-fileupload since I switched to using amazon s3, but I pulled the old code from the git history:

this was my route handler definition:

router.post('/', expressFileupload(), require('./set-logo'));

I think it crashed before entering the 'set-logo' handler. Hard to tell since it's been a while.

I only used it for a couple of days.

It worked fine and uploaded the file if I selected one using Advanced Rest Client. But If left the file selection box empty the route would crash.

@pat310
Copy link

pat310 commented Feb 15, 2017

I'm having a similar problem when using multipart with express-fileupload. You can try this example posted on multer.

RomanBurunkov added a commit that referenced this issue Jun 7, 2019
This was referenced Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants