为了账号安全,请及时绑定邮箱和手机立即绑定

上传图片组件报错问题

上传图片前台报“服务器位置错误”,看后台日志报错


2023-12-04 17:56:40,660 ERROR 72759  --- [3c06302cde41] - nodejs.TypeError: Cannot read property 'path' of null

    at LocalUploader.upload (/Users/xx/Study/lin-cms-koa/app/extensions/file/local-uploader.js:56:23)

    at /Users/xx/Study/lin-cms-koa/app/api/cms/file.js:16:15

    at loginRequired (/Users/xx/Study/lin-cms-koa/app/middleware/jwt.js:73:5)

    at exports.log (/Users/xx/Study/lin-cms-koa/node_modules/lin-mizar/lin/middleware/log.js:14:9)

    at /Users/xx/Study/lin-cms-koa/node_modules/koa-mount/index.js:52:26

    at bodyParser (/Users/xx/Study/lin-cms-koa/node_modules/koa-bodyparser/index.js:78:5)


正在回答

1 回答

找到大佬回复了:

local-uploader.js 修改第 56行代码为 saved.path

https://img1.sycdn.imooc.com/656da3a900018b9317040728.jpg

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

上传图片组件报错问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信