Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Open local media links with the default app https://github.com/siyuan-note/siyuan/issues/19753

Daniel76c4d6521f10
diff --git a/app/src/editor/openLink.ts b/app/src/editor/openLink.ts
index 7a00398f73..daf68887c4 100644
--- a/app/src/editor/openLink.ts
+++ b/app/src/editor/openLink.ts
@@ -29,6 +29,9 @@ import {openMobilePDF} from "../mobile/pdf";
/// #endif
const isPreviewableAsset = (assetPath: string) => {
+ if (isLocalPath(assetPath) && !assetPath.startsWith("assets/") && !assetPath.startsWith("file://")) {
+ return false;
+ }
const extension = getAssetExtension(assetPath).toLowerCase();
return Constants.SIYUAN_ASSETS_EXTS.includes(extension) &&
isBrowserRenderableImagePath(assetPath) &&