mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: video activites issue
This commit is contained in:
parent
137a909347
commit
86645fa81a
5 changed files with 38 additions and 7 deletions
|
|
@ -16,12 +16,14 @@ export async function createFileActivity(file: File, type: string, data: any, ch
|
|||
const formData = new FormData();
|
||||
formData.append("coursechapter_id", chapter_id);
|
||||
|
||||
let endpoint = `${getAPIUrl()}activities/video`;
|
||||
let org_id = "test";
|
||||
|
||||
let endpoint = `${getAPIUrl()}activities/video?org_id=${org_id}`;
|
||||
|
||||
if (type === "video") {
|
||||
formData.append("name", data.name);
|
||||
formData.append("video_file", file);
|
||||
endpoint = `${getAPIUrl()}activities/video`;
|
||||
endpoint = endpoint;
|
||||
}
|
||||
|
||||
const result: any = await fetch(endpoint, RequestBodyForm("POST", formData));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue