Update mime node-mime to 2.3.1

master
Dragory 2018-08-08 01:10:38 +03:00
parent cc68797f0a
commit 55367665e8
3 changed files with 5 additions and 5 deletions

6
package-lock.json generated
View File

@ -1870,9 +1870,9 @@
}
},
"mime": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz",
"integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz",
"integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg=="
},
"mime-db": {
"version": "1.35.0",

View File

@ -15,7 +15,7 @@
"humanize-duration": "^3.12.1",
"json5": "^1.0.1",
"knex": "^0.14.2",
"mime": "^1.3.4",
"mime": "^2.3.1",
"moment": "^2.21.0",
"public-ip": "^2.0.1",
"sqlite3": "^4.0.2",

View File

@ -61,7 +61,7 @@ function serveAttachments(res, pathParts) {
const filenameParts = desiredFilename.split('.');
const ext = (filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : 'bin');
const fileMime = mime.lookup(ext);
const fileMime = mime.getType(ext);
res.setHeader('Content-Type', fileMime);