summaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
authorLennart Weller2019-06-18 14:57:58 +0000
committerLennart Weller2019-06-18 17:13:50 +0200
commitf22a563116be7998f430b6ee4a8b68874ec4643c (patch)
treea67424e799cf0dae6bef561f93aee6dad020ee8e /lib/utils.js
parent8612740f828a25a00df3aa5a16a9f9976f9d4a69 (diff)
Add SVG image detection based on file extension
Add simple SVG image detecetion base on the file extension .svg. This fixes the SVG being delivered as binary/octet-stream and makes it possible to embedd the SVG. Signed-off-by: Lennart Weller <lennart.weller@hansemerkur.de>
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 247f85f2..1725f6e8 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -21,6 +21,8 @@ exports.getImageMimeType = function getImageMimeType (imagePath) {
return 'image/png'
case 'tiff':
return 'image/tiff'
+ case 'svg':
+ return 'image/svg+xml'
default:
return undefined
}