fffiloni commited on
Commit
e947815
1 Parent(s): 365a997

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +5 -4
share_btn.py CHANGED
@@ -14,7 +14,7 @@ share_js = """async () => {
14
  const response = await fetch(UPLOAD_URL, {
15
  method: 'POST',
16
  headers: {
17
- 'Content-Type': file.type,
18
  'X-Requested-With': 'XMLHttpRequest',
19
  },
20
  body: file, /// <- File inherits from Blob
@@ -29,12 +29,11 @@ share_js = """async () => {
29
  const blob = await res.blob();
30
  //const videoId = Date.now() % 200;
31
  const fileName = `talking-portrait-${{videoName}}.mp4`;
32
- const videoBlob = new File([blob], fileName, { type: 'video/mp4' });
33
 
34
  console.log(videoBlob);
35
 
36
- video64 = videoToBase64(videoBlob)
37
- console.log(video64)
38
 
39
  return videoBlob;
40
 
@@ -78,6 +77,8 @@ share_js = """async () => {
78
  loadingIconEl.style.removeProperty('display');
79
 
80
  const videoFile = await getOutputVideoFile(outputVideo, outputVideo_name);
 
 
81
  const dataOutputVideo = await uploadFile(videoFile);
82
 
83
 
 
14
  const response = await fetch(UPLOAD_URL, {
15
  method: 'POST',
16
  headers: {
17
+ 'Content-Type': video/mpeg,
18
  'X-Requested-With': 'XMLHttpRequest',
19
  },
20
  body: file, /// <- File inherits from Blob
 
29
  const blob = await res.blob();
30
  //const videoId = Date.now() % 200;
31
  const fileName = `talking-portrait-${{videoName}}.mp4`;
32
+ const videoBlob = new File([blob], fileName, { type: 'video/mpeg' });
33
 
34
  console.log(videoBlob);
35
 
36
+
 
37
 
38
  return videoBlob;
39
 
 
77
  loadingIconEl.style.removeProperty('display');
78
 
79
  const videoFile = await getOutputVideoFile(outputVideo, outputVideo_name);
80
+ const video64 = await videoToBase64(videoFile)
81
+ console.log(video64)
82
  const dataOutputVideo = await uploadFile(videoFile);
83
 
84