mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
V4.6.7-production (#759)
This commit is contained in:
@@ -58,7 +58,7 @@ export const putDatasetById = (data: DatasetUpdateBody) => PUT<void>(`/core/data
|
||||
export const delDatasetById = (id: string) => DELETE(`/core/dataset/delete?id=${id}`);
|
||||
|
||||
export const postWebsiteSync = (data: PostWebsiteSyncParams) =>
|
||||
POST(`/plusApi/core/dataset/websiteSync`, data, {
|
||||
POST(`/proApi/core/dataset/websiteSync`, data, {
|
||||
timeout: 600000
|
||||
}).catch();
|
||||
|
||||
@@ -76,7 +76,7 @@ export const getDatasetCollectionById = (id: string) =>
|
||||
export const postDatasetCollection = (data: CreateDatasetCollectionParams) =>
|
||||
POST<string>(`/core/dataset/collection/create`, data);
|
||||
export const postCreateDatasetLinkCollection = (data: LinkCreateDatasetCollectionParams) =>
|
||||
POST<{ collectionId: string }>(`/core/dataset/collection/create/link`, data);
|
||||
POST<{ collectionId: string }>(`/proApi/core/dataset/collection/create/link`, data);
|
||||
|
||||
export const putDatasetCollectionById = (data: UpdateDatasetCollectionParams) =>
|
||||
POST(`/core/dataset/collection/update`, data);
|
||||
|
@@ -27,18 +27,22 @@ export const fileCollectionCreate = ({
|
||||
form.append('bucketName', BucketNameEnum.dataset);
|
||||
form.append('file', file, encodeURIComponent(file.name));
|
||||
|
||||
return POST<string>(`/core/dataset/collection/create/file?datasetId=${data.datasetId}`, form, {
|
||||
timeout: 480000,
|
||||
onUploadProgress: (e) => {
|
||||
if (!e.total) return;
|
||||
return POST<string>(
|
||||
`/proApi/core/dataset/collection/create/emptyFile?datasetId=${data.datasetId}`,
|
||||
form,
|
||||
{
|
||||
timeout: 480000,
|
||||
onUploadProgress: (e) => {
|
||||
if (!e.total) return;
|
||||
|
||||
const percent = Math.round((e.loaded / e.total) * 100);
|
||||
percentListen && percentListen(percent);
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data; charset=utf-8'
|
||||
const percent = Math.round((e.loaded / e.total) * 100);
|
||||
percentListen && percentListen(percent);
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data; charset=utf-8'
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
};
|
||||
|
||||
export async function chunksUpload({
|
||||
|
Reference in New Issue
Block a user