From 4309e9e645ed40ccfd6cbbf73c14171c1a2ae49c Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 6 Mar 2026 09:53:52 -0800 Subject: [PATCH] fix(admin-web): remove manual Content-Type header for multipart upload Manually setting Content-Type: multipart/form-data without the boundary causes the server to reject the request. Axios automatically sets the correct header with boundary when FormData is passed. Co-Authored-By: Claude Sonnet 4.6 --- .../src/views/app-versions/AppVersionManagementPage.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/admin-web/src/views/app-versions/AppVersionManagementPage.tsx b/frontend/admin-web/src/views/app-versions/AppVersionManagementPage.tsx index 3738499..f824284 100644 --- a/frontend/admin-web/src/views/app-versions/AppVersionManagementPage.tsx +++ b/frontend/admin-web/src/views/app-versions/AppVersionManagementPage.tsx @@ -320,7 +320,6 @@ const UploadModal: React.FC<{ const info = await apiClient.post<{ versionCode?: number; versionName?: string; minSdkVersion?: string; }>('/api/v1/admin/versions/parse', formData, { - headers: { 'Content-Type': 'multipart/form-data' }, timeout: 120000, }); if (info?.versionName) setVersionName(info.versionName); @@ -351,7 +350,6 @@ const UploadModal: React.FC<{ formData.append('isForceUpdate', String(isForceUpdate)); await apiClient.post('/api/v1/admin/versions/upload', formData, { - headers: { 'Content-Type': 'multipart/form-data' }, timeout: 300000, }); onSuccess();