fix(project): use multipart uploader for category icon upload
This commit is contained in:
@@ -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<FileUploadResponse>('/files/upload', formData);
|
||||
return requestClient.upload<FileUploadResponse>('/files/upload', {
|
||||
file,
|
||||
tenantId: String(tenantId),
|
||||
type,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user