fix: 取消附件上传超时并放宽代理限制,避免慢网大文件上传中断。

This commit is contained in:
zlwu committed 2026-10-29 16:01:26 +08:00
1 parent 8020e667f1
commit 8321246765
6 files changed
+65 -62

No files matched your search

+2 -4
View File
@@ -118,9 +118,6 @@ export function fetchPriceVersionDetail(id: string) {
})
}
/** 多张大图并行上传会超过全局 60s,单独放宽 */
const ATTACHMENT_UPLOAD_TIMEOUT_MS = 300_000
export function fetchUploadAttachment(data: FormData) {
return request.post<{
id: string
@@ -132,7 +129,8 @@ export function fetchUploadAttachment(data: FormData) {
}>({
url: '/web/admin/attachment/upload',
data,
timeout: ATTACHMENT_UPLOAD_TIMEOUT_MS
// 0 = 不限时。100MB 在慢网上会超过全局 60s,也会超过原先单独放宽的 5 分钟
timeout: 0
})
}