Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/8126

Vanessa21fa56e8829a
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index 61cdcde774..0b85f2187c 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -62,6 +62,10 @@ export const openFileById = async (options: {
};
export const openAsset = (assetPath: string, page: number | string, position?: string) => {
+ const suffix = pathPosix().extname(assetPath.split("?page")[0]);
+ if (!Constants.SIYUAN_ASSETS_EXTS.includes(suffix)) {
+ return;
+ }
openFile({
assetPath,
page,