update lên v1.0.3
This commit is contained in:
@@ -52,9 +52,7 @@ export async function uploadChatFile(
|
||||
if (chatId) {
|
||||
formData.append("chatId", chatId);
|
||||
}
|
||||
return await api.post("/ai/chats/upload", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
return await api.post("/ai/chats/upload", formData);
|
||||
}
|
||||
|
||||
export function sendChatMessage(
|
||||
|
||||
@@ -58,11 +58,7 @@ export async function uploadIcon(
|
||||
}
|
||||
formData.append("image", processed);
|
||||
|
||||
return await api.post("/attachments/upload-image", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
return await api.post("/attachments/upload-image", formData);
|
||||
}
|
||||
|
||||
export async function uploadUserAvatar(file: File): Promise<IAttachment> {
|
||||
|
||||
@@ -137,11 +137,7 @@ export async function importPage(file: File, spaceId: string) {
|
||||
formData.append("spaceId", spaceId);
|
||||
formData.append("file", file);
|
||||
|
||||
const req = await api.post<IPage>("/pages/import", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
const req = await api.post<IPage>("/pages/import", formData);
|
||||
|
||||
return req.data;
|
||||
}
|
||||
@@ -156,11 +152,7 @@ export async function importZip(
|
||||
formData.append("source", source);
|
||||
formData.append("file", file);
|
||||
|
||||
const req = await api.post<any>("/pages/import-zip", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
const req = await api.post<any>("/pages/import-zip", formData);
|
||||
|
||||
return req.data;
|
||||
}
|
||||
@@ -186,11 +178,7 @@ export async function uploadFile(
|
||||
formData.append("pageId", pageId);
|
||||
formData.append("file", file);
|
||||
|
||||
const req = await api.post<IAttachment>("/files/upload", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
const req = await api.post<IAttachment>("/files/upload", formData);
|
||||
|
||||
return req as unknown as IAttachment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user