有人可以指出我错过了什么以及为什么同样适用于该应用程序的Android版本的网址对ios不起作用。我正在查看来自同一路径的所有文本数据,但无法显示图像,这里是错误
Failed to load resource: the server responded with a status of 404 (Not Found)
cdvfile://localhost/persistent/appName/.images/folderName/imageName.png
答案 0 :(得分:0)
网址应如下所示:
cdvfile://localhost/persistent/directory/image.png
目录:您在应用中创建的目录名称 。也许这是你代码中的appName。
有关文件和目录的更多信息,请参见此处:
https://www.npmjs.com/package/cordova-plugin-file
也许你的错误来自«images»之前的点。