From dac53264756ea47ec94ff1d1392a98e5a5d19078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 3 Jun 2026 15:28:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=A4=A7=E4=B8=8A=E4=BC=A0=E9=99=90?= =?UTF-8?q?=E5=88=B6=E3=80=81=E5=A4=A7=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ai/create/index.jsx | 4 ++-- src/components/ChunkedUpload/index.jsx | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ai/create/index.jsx b/src/ai/create/index.jsx index f3c500cb..52eef9d7 100644 --- a/src/ai/create/index.jsx +++ b/src/ai/create/index.jsx @@ -519,7 +519,7 @@ function CreateResource(props) { ref={uploadRef} fileType={"ai-resource"} disabled={loading} - maxSize={50 * 1024 * 1024 * 1024} // 50GB + maxSize={1024 * 1024 * 1024 * 1024} // 1TB onUploadComplete={(fileInfo) => { // 设置表单字段,保存 fileId setFieldsValue({ @@ -538,7 +538,7 @@ function CreateResource(props) {
请上传{typeDetail.name}压缩包(支持 .zip 格式)
请确保压缩包内包含{typeDetail.name}文件及 README.md,系统将自动解析说明文档
-
单文件最大支持 50GB,系统支持断点续传
+
单文件最大支持 1TB,系统支持断点续传
)} diff --git a/src/components/ChunkedUpload/index.jsx b/src/components/ChunkedUpload/index.jsx index eb430354..fc2d38a8 100644 --- a/src/components/ChunkedUpload/index.jsx +++ b/src/components/ChunkedUpload/index.jsx @@ -302,10 +302,10 @@ const ChunkedUpload = forwardRef(({ setUploadId(resumingUploadId); // 处理会话状态为合并中的情况(参照 ruoyi-react) - if (checkData.resumingSessionStatus === 'MERGING' || checkData.resumingSessionStatus === '合并中') { + if (checkData.resumingUploadStatus === 'MERGING' || checkData.resumingUploadStatus === '合并中') { // message.info('文件正在合并中,请稍候...'); // 直接轮询进度 - const mergeResult = await pollMergeStatus(newUploadId, (mergeProgress) => { + const mergeResult = await pollMergeStatus(resumingUploadId, (mergeProgress) => { setProgress(mergeProgress); }); setUploadStatus('completed'); @@ -405,9 +405,10 @@ const ChunkedUpload = forwardRef(({ // 继续轮询(合并中或其他中间状态) retryCount++; - if (retryCount >= maxRetries) { - throw new Error('合并超时,请稍后查看结果'); - } + // 不要做最大次数限制 + // if (retryCount >= maxRetries) { + // throw new Error('合并超时,请稍后查看结果'); + // } // 等待指定间隔后继续轮询 await new Promise(resolve => setTimeout(resolve, interval));