fix(project): use multipart uploader for category icon upload

This commit is contained in:
2026-02-20 16:31:01 +08:00
parent d66cd70b65
commit 937c9b4334

View File

@@ -36,10 +36,9 @@ export async function uploadTenantFileApi(
throw new Error('缺少租户标识'); throw new Error('缺少租户标识');
} }
const formData = new FormData(); return requestClient.upload<FileUploadResponse>('/files/upload', {
formData.append('File', file); file,
formData.append('TenantId', String(tenantId)); tenantId: String(tenantId),
formData.append('Type', type); type,
});
return requestClient.post<FileUploadResponse>('/files/upload', formData);
} }