fix colection create api (#766)

Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
Archer
2024-01-23 09:01:24 +08:00
committed by GitHub
parent aab6ee51eb
commit 379673cae1
143 changed files with 40737 additions and 274 deletions

View File

@@ -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({