Skip to content
Snippets Groups Projects
Commit 14084468 authored by Steffen Vogel's avatar Steffen Vogel :santa_tone2:
Browse files

keep file extensions in order for to serve files with correct mimetype (fixes #25)

parent f95066a2
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ router.post('/upload', function(req, res) {
const form = new formidable.IncomingForm();
const userFolder = path.join(publicDir, user._id + ''); // ensure is a string
form.uploadDir = userFolder;
form.keepExtensions = true;
form.on('error', function(error) {
logger.error('Unable to process incoming form', error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment