Update mime node-mime to 2.3.1
parent
cc68797f0a
commit
55367665e8
|
@ -1870,9 +1870,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mime": {
|
"mime": {
|
||||||
"version": "1.3.6",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz",
|
||||||
"integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA="
|
"integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg=="
|
||||||
},
|
},
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.35.0",
|
"version": "1.35.0",
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"humanize-duration": "^3.12.1",
|
"humanize-duration": "^3.12.1",
|
||||||
"json5": "^1.0.1",
|
"json5": "^1.0.1",
|
||||||
"knex": "^0.14.2",
|
"knex": "^0.14.2",
|
||||||
"mime": "^1.3.4",
|
"mime": "^2.3.1",
|
||||||
"moment": "^2.21.0",
|
"moment": "^2.21.0",
|
||||||
"public-ip": "^2.0.1",
|
"public-ip": "^2.0.1",
|
||||||
"sqlite3": "^4.0.2",
|
"sqlite3": "^4.0.2",
|
||||||
|
|
|
@ -61,7 +61,7 @@ function serveAttachments(res, pathParts) {
|
||||||
|
|
||||||
const filenameParts = desiredFilename.split('.');
|
const filenameParts = desiredFilename.split('.');
|
||||||
const ext = (filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : 'bin');
|
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);
|
res.setHeader('Content-Type', fileMime);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue