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:
parent
adda5e04d7
commit
4309e9e645
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue