fix(admin-web): add Content-Type multipart/form-data to parse and upload calls
Same pattern as rwadurian mobile-upgrade version-repository-impl.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
07c171ce22
commit
e011eacbe6
|
|
@ -323,7 +323,10 @@ const UploadModal: React.FC<{
|
|||
formData.append('file', f);
|
||||
const info = await apiClient.post<{
|
||||
versionCode?: number; versionName?: string; minSdkVersion?: string;
|
||||
}>('/api/v1/admin/versions/parse', formData, { timeout: 120000 });
|
||||
}>('/api/v1/admin/versions/parse', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
timeout: 120000,
|
||||
});
|
||||
console.log('[Upload] Parse result:', info);
|
||||
if (info?.versionName) setVersionName(info.versionName);
|
||||
if (info?.versionCode) setBuildNumber(String(info.versionCode));
|
||||
|
|
@ -355,6 +358,7 @@ const UploadModal: React.FC<{
|
|||
formData.append('isForceUpdate', String(isForceUpdate));
|
||||
|
||||
const result = await apiClient.post('/api/v1/admin/versions/upload', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
timeout: 300000,
|
||||
});
|
||||
console.log('[Upload] Success:', result);
|
||||
|
|
|
|||
Loading…
Reference in New Issue