From 2d888181a092a8acb8407af796f70c96250b3dd4 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 3 Sep 2019 13:12:09 +0000 Subject: [PATCH] [UtilsService]: Add on allowed file types application/vnd.ms-excel for windows. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@56956 d315682c-612b-4755-9ff5-7f18f6832af3 --- services/utils-service/uploadService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/utils-service/uploadService.js b/services/utils-service/uploadService.js index 79df4c98..9f095528 100644 --- a/services/utils-service/uploadService.js +++ b/services/utils-service/uploadService.js @@ -70,7 +70,7 @@ app.use(function (req, res, next) { app.post("/upload", upload.array("uploads[]", 12), function (req, res) { var filepath = (localPath?".":__dirname)+"/" + req.files[0].path; - if (req.files[0].mimetype !== 'text/csv') { + if (req.files[0].mimetype !== 'text/csv' && req.files[0].mimetype !== 'application/vnd.ms-excel') { console.error("No proper file type"); res.status(500).send(getResponse(500, "No proper file type")); } else {