首页 文章

在离子图像上传中无法读取未定义的属性'split'

提问于
浏览
0

我尝试在浏览器中测试我的离子图像上传应用程序,但由于我无法上传图像,因为cordova_not_available已显示在屏幕上,每次我点击上传按钮时都会弹出此错误 Cannot read property 'split' of undefined

在我的upload.ts我有这个

let filename = this.imagePath.split('/').pop();

1 回答

  • 0

    这可能是因为您的变量 this.imagePath 为空或空...您如何获得该值?

相关问题