mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
18 lines
520 B
TypeScript
18 lines
520 B
TypeScript
import { GET, POST, PUT, DELETE } from '@/web/common/api/request';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
export const postUploadImg = (base64Img: string) =>
|
|
POST<string>('/common/file/uploadImage', { base64Img });
|
|
|
|
export const postUploadFiles = (
|
|
data: FormData,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void
|
|
) =>
|
|
POST<string[]>('/common/file/upload', data, {
|
|
timeout: 60000,
|
|
onUploadProgress,
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data; charset=utf-8'
|
|
}
|
|
});
|