diff --git a/frontend/app.js b/frontend/app.js index 6e82c8a..3c5a4a2 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -1436,6 +1436,7 @@ handleDragLeave(e) { 'Authorization': `Bearer ${this.token}`, 'Content-Type': 'multipart/form-data' }, + timeout: 30 * 60 * 1000, // 30分钟超时,支持大文件上传 onUploadProgress: (progressEvent) => { this.uploadProgress = Math.round((progressEvent.loaded * 100) / progressEvent.total); this.uploadedBytes = progressEvent.loaded; diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2fe78f7..740be5b 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -49,10 +49,16 @@ server { proxy_set_header Cookie $http_cookie; proxy_pass_header Set-Cookie; - # 增加超时时间支持大文件上传 - proxy_connect_timeout 300; - proxy_send_timeout 300; - proxy_read_timeout 300; + # 增加超时时间支持大文件上传(30分钟) + proxy_connect_timeout 1800; + proxy_send_timeout 1800; + proxy_read_timeout 1800; + send_timeout 1800; + + # 大文件上传缓冲优化 + proxy_request_buffering off; + proxy_buffering off; + client_body_buffer_size 128k; } # 分享链接重定向