diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | app.js | 3 | ||||
-rw-r--r-- | public/uploads/.gitkeep | 0 |
3 files changed, 6 insertions, 0 deletions
@@ -25,3 +25,6 @@ public/js/config.js # ignore webpack build public/build public/views/build + +public/uploads/* +!public/uploads/.gitkeep @@ -405,6 +405,9 @@ app.get('/me', function (req, res) { //upload to imgur app.post('/uploadimage', function (req, res) { var form = new formidable.IncomingForm(); + form.uploadDir = "public/uploads"; + form.keepExtensions = true; + form.parse(req, function (err, fields, files) { if (err || !files.image || !files.image.path) { response.errorForbidden(res); diff --git a/public/uploads/.gitkeep b/public/uploads/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/uploads/.gitkeep |