初始化提交
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user