From 937c9b43347715343f08ef5d19318b3a20af4afc Mon Sep 17 00:00:00 2001 From: MSuMshk <2039814060@qq.com> Date: Fri, 20 Feb 2026 16:31:01 +0800 Subject: [PATCH] fix(project): use multipart uploader for category icon upload --- apps/web-antd/src/api/files.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/api/files.ts b/apps/web-antd/src/api/files.ts index 0ed7f5b..08332be 100644 --- a/apps/web-antd/src/api/files.ts +++ b/apps/web-antd/src/api/files.ts @@ -36,10 +36,9 @@ export async function uploadTenantFileApi( throw new Error('缺少租户标识'); } - const formData = new FormData(); - formData.append('File', file); - formData.append('TenantId', String(tenantId)); - formData.append('Type', type); - - return requestClient.post('/files/upload', formData); + return requestClient.upload('/files/upload', { + file, + tenantId: String(tenantId), + type, + }); }