EncodingError when cordova-plugin-file

后端 未结 1 351
無奈伤痛
無奈伤痛 2021-01-07 02:41

I am now developing a cordova app which platform is browser.

I need to access a text file from local file system, so I am using the cordova-plugin-file.

But I

相关标签:
1条回答
  • 2021-01-07 03:21

    Good reference point for the file plugin are its auto and manual tests, which can be run in cordova-plugin-test-framework and also the file plugin documentation.

    A few points on your question:

    • try to use something less than 100500*1024*1024, for example 10*1024*1024,
    • instead of

    window.webkitResolveLocalFileSystemURL("filesystem:" + cordova.file.applicationDirectory + "1111.csv", gotFile, fail);

    try to use

    window.resolveLocalFileSystemURL("filesystem:" + cordova.file.applicationDirectory + "persistent/1111.csv", gotFile, fail);

    0 讨论(0)
提交回复
热议问题