mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
fix colection create api (#766)
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -27,22 +27,18 @@ export const fileCollectionCreate = ({
|
||||
form.append('bucketName', BucketNameEnum.dataset);
|
||||
form.append('file', file, encodeURIComponent(file.name));
|
||||
|
||||
return POST<string>(
|
||||
`/proApi/core/dataset/collection/create/emptyFile?datasetId=${data.datasetId}`,
|
||||
form,
|
||||
{
|
||||
timeout: 480000,
|
||||
onUploadProgress: (e) => {
|
||||
if (!e.total) return;
|
||||
return POST<string>(`/core/dataset/collection/create/file?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