mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
fix(export/share): use right extension for images
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { join } from "path";
|
||||
import NoteMeta, { NoteMetaFile } from "../../meta/note_meta";
|
||||
import { ZipExportProvider } from "./abstract_provider.js";
|
||||
import { ExportFormat, ZipExportProvider } from "./abstract_provider.js";
|
||||
import { RESOURCE_DIR } from "../../resource_dir";
|
||||
import { getResourceDir, isDev } from "../../utils";
|
||||
import fs from "fs";
|
||||
@@ -65,6 +65,14 @@ export default class ShareThemeExportProvider extends ZipExportProvider {
|
||||
this.#saveIndex(rootMeta);
|
||||
}
|
||||
|
||||
mapExtension(type: string | null, mime: string, existingExtension: string, format: ExportFormat): string | null {
|
||||
if (mime.startsWith("image/")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return "html";
|
||||
}
|
||||
|
||||
#saveIndex(rootMeta: NoteMeta) {
|
||||
if (!this.indexMeta?.dataFileName) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user