当前位置:   article > 正文

Excel上传出错:TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string or an instan_the "path" argument must be of type string or an i

the "path" argument must be of type string or an instance of buffer or url.

Excel上传出错:TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string or an instance of Buffer or URL.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined       
      at Object.open (fs.js:465:10)
      at _openReadFs (internal/fs/streams.js:121:15)
      at new ReadStream (internal/fs/streams.js:98:5)
      at Object.createReadStream (fs.js:2075:10)
  • 1
  • 2
  • 3
  • 4
  • 5

解决办法:
file.path 改为 file.filepath ,错误解决
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/198182?site
推荐阅读
相关标签
  

闽ICP备14008679号