StorageController.ts
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包
// endregion
/**
* @author kepler
*/
export const StorageController = {
/**
*/
removeVehicleAlbum(axios: AxiosStatic, filePath: string, vehicleId: number): Promise<AxiosResponse<void>> {
return axios.delete("upload/removeVehicleAlbum", { params: { filePath, vehicleId } });
},
/**
* 更新车辆图片
* @param vehicle
* @return int
*/
updateVehicleAlbums(axios: AxiosStatic, vehicle: any): Promise<AxiosResponse<number>> {
return axios.post("upload/updateVehicleAlbums", vehicle);
},
/**
* 富文本图片上传
* @param file
* @param request
* @return Map
* @throws FileStorageException
*/
uploadPasteImage(axios: AxiosStatic, file: any): Promise<AxiosResponse<any>> {
return axios.post("upload/uploadRichTextImage", null, { params: { file } });
},
/**
*/
uploadVehicleAlbum(
axios: AxiosStatic,
file: any,
vehicleId: number,
fileSubtype: string,
directory: string,
cache: boolean | null | undefined,
): Promise<AxiosResponse<FileInfo>> {
return axios.post("upload/uploadVehicleAlbum", null, {
params: { file, vehicleId, fileSubtype, directory, cache },
});
},
// region 前端扩展代码区
// endregion
};