mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
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>
This commit is contained in:
parent
8612740f82
commit
f22a563116
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue