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 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-06 09:53:52 -08:00
parent adda5e04d7
commit 4309e9e645
1 changed files with 0 additions and 2 deletions

View File

@ -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();