Skip to content

Build your personal knowledge base with Trilium Notes

fix SVG single file import as image and not as file, closes #1114

zadam238df0fb40fb
diff --git a/src/services/import/single.js b/src/services/import/single.js
index 983cca355a..2c99a687f7 100644
--- a/src/services/import/single.js
+++ b/src/services/import/single.js
@@ -24,7 +24,7 @@ async function importSingleFile(taskContext, file, parentNote) {
return await importCodeNote(taskContext, file, parentNote);
}
- if (["image/jpeg", "image/gif", "image/png", "image/webp"].includes(mime)) {
+ if (mime.startsWith("image/")) {
return await importImage(file, parentNote, taskContext);
}
@@ -166,4 +166,4 @@ function getFileNameWithoutExtension(filePath) {
module.exports = {
importSingleFile
-};
\ No newline at end of file
+};