Commit 499b797d by Roy Committed by GitHub

fix: longer timeout (#6012)

parent b0a58b98
...@@ -134,7 +134,8 @@ const FileSelector = ({ ...@@ -134,7 +134,8 @@ const FileSelector = ({
} }
}); });
handleChangeFiles(files); handleChangeFiles(files);
} },
timeout: 5 * 60 * 1000 // 5 minutes
}); });
const previewUrl = await getPresignedChatFileGetUrl({ const previewUrl = await getPresignedChatFileGetUrl({
key: fields.key, key: fields.key,
......
...@@ -196,7 +196,8 @@ export const useFileUpload = (props: UseFileUploadOptions) => { ...@@ -196,7 +196,8 @@ export const useFileUpload = (props: UseFileUploadOptions) => {
const percent = Math.round((e.loaded / e.total) * 100); const percent = Math.round((e.loaded / e.total) * 100);
copyFile.process = percent; copyFile.process = percent;
updateFiles(fileIndex, copyFile); updateFiles(fileIndex, copyFile);
} },
timeout: 5 * 60 * 1000 // 5 minutes
}).catch((error) => Promise.reject(parseS3UploadError({ t, error, maxSize }))); }).catch((error) => Promise.reject(parseS3UploadError({ t, error, maxSize })));
const previewUrl = await getPresignedChatFileGetUrl({ const previewUrl = await getPresignedChatFileGetUrl({
......
...@@ -109,7 +109,8 @@ const QuickCreateDatasetModal = ({ ...@@ -109,7 +109,8 @@ const QuickCreateDatasetModal = ({
: item : item
) )
); );
} },
timeout: 5 * 60 * 1000 // 5 minutes
}) })
.then(() => { .then(() => {
setSelectFiles((state) => setSelectFiles((state) =>
......
...@@ -96,7 +96,8 @@ const SelectFile = React.memo(function SelectFile() { ...@@ -96,7 +96,8 @@ const SelectFile = React.memo(function SelectFile() {
: item : item
) )
); );
} },
timeout: 5 * 60 * 1000 // 5 minutes
}) })
.then(() => { .then(() => {
setSelectFiles((state) => setSelectFiles((state) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment