平台:cocos creator运行环境:android报错:TypeError: root.FormData is not a constructor at Request.getFormData (dst/__nodemodules/leancloud-storage/dist/av.js:17631) at Request.attach (dst/__node_modules/leancloud-storage/dist/av.js:17623) at exports.upload (dst/__node_modules/leancloud-storage/dist/av.js:16970) at module.exports (dst/__node_modules/leancloud-storage/dist/av.js:9250) at dst/__node_modules/leancloud-storage/dist/av.js:9077 at run (dst/__node_modules/leancloud-storage/dist/av.js:5301) at dst/__node_modules/leancloud-storage/dist/av.js:5318 at flush (dst/__node_modules/leancloud-storage/dist/av.js:5600)
这咋解决。。。。
//构建代码。。。 const data = [0x4c, 0x65, 0x61, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64]; const file = new AV.File('resume.txt', data); file.save().then((file) => { console.log(`文件保存完成。`); }, (error) => { // 保存失败,可能是文件无法被读取,或者上传过程中出现问题 });
@leeyeh
是不是非要充值才会有人回答啊?