diff --git a/example/upload.js b/example/upload.js index f99ff59..dd92ed8 100644 --- a/example/upload.js +++ b/example/upload.js @@ -21,7 +21,7 @@ app.get('/', function (req, res, next) { "List all containers

" + "Upload to container c1:

" + "

" - + "File to upload:
" + + "File to upload:
" + "Notes about the file:
" + "
" + ""; @@ -70,4 +70,4 @@ app.get('/download/:container/:file', function (req, res, next) { }); }); -app.listen(app.get('port')); \ No newline at end of file +app.listen(app.get('port')); diff --git a/lib/storage-handler.js b/lib/storage-handler.js index deeeaf9..1a884c4 100644 --- a/lib/storage-handler.js +++ b/lib/storage-handler.js @@ -61,7 +61,7 @@ Uploader.prototype.processUpload = function (req, res, cb) { part.on('end', function () { writer.end(function () { self._flushing--; - self.emit('file', part.name, file); + self.emit('file', part.name + ':' + file.name, file); self._maybeEnd(); }); });