Skip to content
Myr

Fixed file upload

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 4c94457 · Browse files · 2 files+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:examples/upload/app.js+1 added-2 removed
modified:lib/express/core.js+1 added-1 removed
218 unmodified lines
219 request.setBodyEncoding('binary')220 if (request.headers['content-type'] &&221 request.headers['content-type'].indexOf('multipart/form-data') !== -1) {222 var stream = new multipart.Stream(request)223 request.params = { post: {}}224 stream.addListener('part', function(part){224 request.params = { post: {}}225 if (part.filename) {226 var file = new File(part.tempfile = '/tmp/express-' + Number(new Date), 'w')227 part.pos = 0228 part.addListener('body', function(chunk){
87 unmodified lines