Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/10715

Vanessa148c5a265f59
diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.ts
index ca59ab111e..3e258a94fe 100644
--- a/app/src/util/fetch.ts
+++ b/app/src/util/fetch.ts
@@ -85,7 +85,11 @@ export const fetchSyncPost = async (url: string, data?: any) => {
method: "POST",
};
if (data) {
- init.body = JSON.stringify(data);
+ if (data instanceof FormData) {
+ init.body = data;
+ } else {
+ init.body = JSON.stringify(data);
+ }
}
const res = await fetch(url, init);
const res2 = await res.json() as IWebSocketData;