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('缺少租户标识');
|
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);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user