Skip to content
Myr

Implemented uid() for upload tempfiles. Closes #166

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

authored by visionmedia · committed by visionmedia · parent 5fe033c · Browse files · 1 file+1 added−1 removed
This commit

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/express/core.js+1 added-1 removed
221 unmodified lines
222 var stream = new multipart.Stream(request)223 request.params = { post: {}}224 stream.addListener('part', function(part){225 if (part.filename) {226 var file = new File(part.tempfile = '/tmp/express-' + Number(new Date), 'w')226 var file = new File(part.tempfile = '/tmp/express-' + Number(new Date) + uid(), 'w')227 part.pos = 0228 part.addListener('body', function(chunk){229 file.write(chunk, part.pos, 'binary')230 part.pos += chunk.length
86 unmodified lines