From 8068a57afaf28f8fd0b509e02571f6b79cefc844 Mon Sep 17 00:00:00 2001 From: longjuan <769022681@qq.com> Date: Fri, 6 Jan 2023 11:10:37 +0800 Subject: [PATCH] fix: timeout error caused by upload processing for more than 30 seconds (#813) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: Remove the timeout error prompt caused by the upload server processing for more than 30 seconds #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3041 #### Screenshots: ![image](https://user-images.githubusercontent.com/28662535/210917239-b4b050f8-766f-4289-9ba2-ccb99bb6ac55.png) ![image](https://user-images.githubusercontent.com/28662535/210917273-c6291485-f420-4f02-a7c8-2b4b286110d4.png) #### Special notes for your reviewer: 测试: 上传大文件让后端处理过程超过30秒,观察是否报错 或使用[修改后的插件](https://github.com/longjuan/halo-plugin-s3os/actions/runs/3852075387)上传到对象存储,观察61秒后是否上传成功 #### Does this PR introduce a user-facing change? ```release-note 去除上传文件处理时间超过30秒后的报错 ``` --- src/components/upload/UppyUpload.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/upload/UppyUpload.vue b/src/components/upload/UppyUpload.vue index 3455d900..756dadb9 100644 --- a/src/components/upload/UppyUpload.vue +++ b/src/components/upload/UppyUpload.vue @@ -52,6 +52,7 @@ const uppy = computed(() => { fieldName: props.name, method: props.method, limit: 5, + timeout: 0, getResponseError: (responseText) => { const response = JSON.parse(responseText); const { title, detail } = (response || {}) as ProblemDetail;