{"action":"created","issue":{"url":"https://api.github.com/repos/domharrington/fileupload/issues/14","labels_url":"https://api.github.com/repos/domharrington/fileupload/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/domharrington/fileupload/issues/14/comments","events_url":"https://api.github.com/repos/domharrington/fileupload/issues/14/events","html_url":"https://github.com/domharrington/fileupload/issues/14","id":125951450,"number":14,"title":"Cannot find uploaded file","user":{"login":"tno2007","id":6169249,"avatar_url":"https://avatars.githubusercontent.com/u/6169249?v=3","gravatar_id":"","url":"https://api.github.com/users/tno2007","html_url":"https://github.com/tno2007","followers_url":"https://api.github.com/users/tno2007/followers","following_url":"https://api.github.com/users/tno2007/following{/other_user}","gists_url":"https://api.github.com/users/tno2007/gists{/gist_id}","starred_url":"https://api.github.com/users/tno2007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tno2007/subscriptions","organizations_url":"https://api.github.com/users/tno2007/orgs","repos_url":"https://api.github.com/users/tno2007/repos","events_url":"https://api.github.com/users/tno2007/events{/privacy}","received_events_url":"https://api.github.com/users/tno2007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-11T14:07:46Z","updated_at":"2016-01-13T16:31:13Z","closed_at":"2016-01-13T16:31:13Z","body":"I have a simple application:\r\n\r\n\tvar express = require('express');\r\n\tvar fileupload = require('fileupload').createFileUpload(\"/uploadDir\").middleware;\r\n\tvar app = express();\r\n\r\n\tvar SERVER_PORT = 3000;\r\n\r\n\tapp.get('/', function(req, res) {\r\n\t\tres.end(\"upload service running!\");\r\n\t});\r\n\r\n\tapp.post('/upload', fileupload, function(req, res) {\r\n\t\t// files are now in the req.body object along with other form fields\r\n\t\t// files also get moved to the uploadDir specified\r\n\t\tconsole.log(\"upload done!\");\r\n\t\tres.end(\"upload done!\");\r\n\t\t\r\n\t});\r\n\r\n\tvar server = app.listen(SERVER_PORT, function() {\r\n\t\tconsole.log(\"Listening on port \" + server.address().port);\r\n\t});\r\n\r\nand a simple upload html page:\r\n\r\n\t<!DOCTYPE html>\r\n\t<html>\r\n\t<body>\r\n\r\n\t<form action=\"http://localhost:3000/upload\" method=\"post\" enctype=\"multipart/form-data\">\r\n\t\tSelect image to upload:\r\n\t\t<input type=\"file\" name=\"fileToUpload\">\r\n\t\t<input type=\"submit\" value=\"Upload file\" name=\"submit\">\r\n\t</form>\r\n\r\n\t</body>\r\n\t</html>\r\n\r\nWhen I upload a file, the uploadDir directory is empty. How do I keep the file that I have uploaded? Am I missing some code?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/domharrington/fileupload/issues/comments/171352514","html_url":"https://github.com/domharrington/fileupload/issues/14#issuecomment-171352514","issue_url":"https://api.github.com/repos/domharrington/fileupload/issues/14","id":171352514,"user":{"login":"domharrington","id":848223,"avatar_url":"https://avatars.githubusercontent.com/u/848223?v=3","gravatar_id":"","url":"https://api.github.com/users/domharrington","html_url":"https://github.com/domharrington","followers_url":"https://api.github.com/users/domharrington/followers","following_url":"https://api.github.com/users/domharrington/following{/other_user}","gists_url":"https://api.github.com/users/domharrington/gists{/gist_id}","starred_url":"https://api.github.com/users/domharrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domharrington/subscriptions","organizations_url":"https://api.github.com/users/domharrington/orgs","repos_url":"https://api.github.com/users/domharrington/repos","events_url":"https://api.github.com/users/domharrington/events{/privacy}","received_events_url":"https://api.github.com/users/domharrington/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T16:31:13Z","updated_at":"2016-01-13T16:31:13Z","body":"Hi,\r\n\r\nI've actually deprecated this module: https://github.com/domharrington/fileupload#deprecation-if-you-need-a-file-upload-middleware-i-would-recommend-using-multer-or-busboy. I've forgotten to publish to NPM with this notice so maybe you missed it.\r\n\r\nYou should use [multer](https://www.npmjs.com/package/multer) or [busboy](https://www.npmjs.com/package/busboy) instead of this. The usage examples for multer look very similar to this module, but probably work a lot better https://www.npmjs.com/package/multer#usage.\r\n\r\nThanks."}}