|
@@ -81,13 +81,18 @@ export const api = {
|
|
|
},
|
|
|
async uploadPlot(token: string, video_data: VideoCreate, file: File) {
|
|
|
const formData = new FormData();
|
|
|
- formData.append("title", video_data.title)
|
|
|
- formData.append("anchor", video_data.anchor)
|
|
|
- formData.append("style", video_data.style)
|
|
|
- formData.append("lang", video_data.lang)
|
|
|
formData.append("upload_file", file)
|
|
|
- return axios.post<VideoUploaded>(`${apiUrl}/api/v1/videos/`, formData, authHeaders(token));
|
|
|
- },
|
|
|
+ return axios.post<VideoUploaded>(`${apiUrl}/api/v1/videos/v1/?title=${video_data.title}&character_id=1&style_id=1&lang=1&voice_id=1`, formData, authHeaders(token));
|
|
|
+ },
|
|
|
+ // async uploadPlot(token: string, video_data: VideoCreate, file: File) {
|
|
|
+ // const formData = new FormData();
|
|
|
+ // formData.append("title", video_data.title)
|
|
|
+ // formData.append("anchor", video_data.anchor)
|
|
|
+ // formData.append("style", video_data.style)
|
|
|
+ // formData.append("lang", video_data.lang)
|
|
|
+ // formData.append("upload_file", file)
|
|
|
+ // return axios.post<VideoUploaded>(`${apiUrl}/api/v1/videos/`, formData, authHeaders(token));
|
|
|
+ // },
|
|
|
async uploadImage(token: string, file: File[]) {
|
|
|
const formData = new FormData();
|
|
|
for (let i = 0; i < file.length; i++) {
|