LeanCloud报错Cannot read property '_thenRunCallbacks' of undefined

代码如下:

var file = new AV.File("test.png", req.files.file);
file.save()
    .then(function(response) { console.log(response._url); }, function(error) { console.log(error); });

错误如下:

TypeError: Cannot read property '_thenRunCallbacks' of undefined 
阅读 3.8k
2 个回答
新手上路,请多包涵

也报同样的错误。

我用的是koa@1.x,用busboy来处理上传时也遇到了这个问题。
不过可以参考下https://leancloud.cn/docs/leanengine_gui...,算是官网的另一个教程,用的是multiparty 亲测可用- -

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题