0

尝试创建 blob 文件但未生成 blob 我正在使用 react-app-rewired 如果我确实删除了 react-app-rewired 它开始工作是什么原因有人可以帮助解决这个问题吗?

script: {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-scripts eject"
}

const changeVideoHandler = async e => {
  if (e.target.files.length > 0) {
    let objectURL = "http://vjs.zencdn.net/v/oceans.mp4";
    let blob = await fetch(objectURL).then(r => r.blob());

    console.log("blob", blob);

    var videoUrl = URL.createObjectURL(blob);

    console.log("videoUrl", videoUrl);

    setVideo(blob, videoUrl)(dispatch);

    cleanLoadMetadata()(dispatch);
    let formData = new FormData();
    formData.append("video", blob);
    uploadVideoServer(formData)(dispatch);
  }
};
4

0 回答 0