Revision 56956
Added by Konstantinos Triantafyllou over 4 years ago
modules/uoa-services-portal/trunk/services/utils-service/uploadService.js | ||
---|---|---|
70 | 70 |
|
71 | 71 |
app.post("/upload", upload.array("uploads[]", 12), function (req, res) { |
72 | 72 |
var filepath = (localPath?".":__dirname)+"/" + req.files[0].path; |
73 |
if (req.files[0].mimetype !== 'text/csv') { |
|
73 |
if (req.files[0].mimetype !== 'text/csv' && req.files[0].mimetype !== 'application/vnd.ms-excel') {
|
|
74 | 74 |
console.error("No proper file type"); |
75 | 75 |
res.status(500).send(getResponse(500, "No proper file type")); |
76 | 76 |
} else { |
Also available in: Unified diff
[UtilsService]: Add on allowed file types application/vnd.ms-excel for windows.