初始化提交

This commit is contained in:
2024-08-13 09:37:23 +08:00
parent 4923337038
commit e112fa4e44
50 changed files with 1649 additions and 259 deletions
@@ -63,7 +63,7 @@ export function useFile() {
...requestParams,
}),
});
if (!response.ok) throw new Error("Failed to upload document.");
if (!response.ok) throw new Error("上传文件时发生错误。");
return await response.json();
};
@@ -109,7 +109,7 @@ export function useFile() {
}
const filetype = docMineTypeMap[file.type];
if (!filetype) throw new Error("Unsupported document type.");
if (!filetype) throw new Error("不支持的文件类型。");
const newDoc: Omit<DocumentFile, "content"> = {
id: uuidv4(),
filetype,