Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js TypeError:FormData.append:参数2未实现接口Blob_Node.js_Reactjs_Api_Axios - Fatal编程技术网

Node.js TypeError:FormData.append:参数2未实现接口Blob

Node.js TypeError:FormData.append:参数2未实现接口Blob,node.js,reactjs,api,axios,Node.js,Reactjs,Api,Axios,我正在尝试使用Reactjs和Nodejs上传excel文件。Nodejs代码在postman中运行良好,但在此处添加url时,它不起作用 App/this.fileUploadHandler src/App/App.js:33 30 | 31 | //FileName = event.target.files[0].name 32 | const fd = new FormData(); > 33 | fd.append('excel', this.state.selec

我正在尝试使用Reactjs和Nodejs上传excel文件。Nodejs代码在postman中运行良好,但在此处添加url时,它不起作用

App/this.fileUploadHandler
src/App/App.js:33
  30 | 
  31 | //FileName = event.target.files[0].name
  32 | const fd = new FormData();
> 33 | fd.append('excel', this.state.selectedFile, this.state.selectedFile.name);
     | ^  34 | axios.post('http://localhost:4000/upload', fd)
  35 | .then(res => {
  36 | console.log(res)