mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix SVG single file import as image and not as file, closes #1114
This commit is contained in:
parent
89356918f1
commit
238df0fb40
@ -24,7 +24,7 @@ async function importSingleFile(taskContext, file, parentNote) {
|
|||||||
return await importCodeNote(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);
|
return await importImage(file, parentNote, taskContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,4 +166,4 @@ function getFileNameWithoutExtension(filePath) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
importSingleFile
|
importSingleFile
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user