mirror of
https://github.com/PlayEdu/backend
synced 2025-06-09 04:24:06 +08:00
上传api
This commit is contained in:
parent
83c12df6ab
commit
973d08b5dc
@ -7,3 +7,6 @@ export * as courseChapter from "./course-chapter";
|
|||||||
export * as course from "./course";
|
export * as course from "./course";
|
||||||
export * as courseHour from "./course-hour";
|
export * as courseHour from "./course-hour";
|
||||||
export * as department from "./department";
|
export * as department from "./department";
|
||||||
|
export * as resourceCategory from "./resource-category";
|
||||||
|
export * as resource from "./resource";
|
||||||
|
export * as upload from "./upload";
|
||||||
|
14
src/api/upload.ts
Normal file
14
src/api/upload.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import client from "./internal/httpClient";
|
||||||
|
|
||||||
|
export function image(categoryId: number, file: File) {
|
||||||
|
return client.post("/backend/v1/upload/image", {
|
||||||
|
category_id: categoryId,
|
||||||
|
file: file,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function minioToken(extension: string) {
|
||||||
|
return client.get("/backend/v1/upload/minio-token", {
|
||||||
|
extension,
|
||||||
|
});
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user