cordova,在浏览器平台中访问本地文件系统
我试图开发一个cordova应用程序,使用浏览器平台下载本地文件系统中的文件,但我总是遇到本地存储uri的问题。我使用cordova,在浏览器平台中访问本地文件系统,cordova,browser,Cordova,Browser,我试图开发一个cordova应用程序,使用浏览器平台下载本地文件系统中的文件,但我总是遇到本地存储uri的问题。我使用 ... // request access to file system window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, function onFileSystemSuccess(fileSystem) { fileSystem.getFile( "test.t
...
// request access to file system
window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory,
function onFileSystemSuccess(fileSystem) {
fileSystem.getFile(
"test.txt", {create: true, exclusive: false},
function onGetFileSuccess(fileEntry) {
...
},
function onGetFileError (error) {
}
);
},
function onFileSystemError(error) {
...
}
);
...
我还使用了--禁用web安全性--允许从文件访问文件
chromium参数,但如果使用其他cordova.file.*值,我也会在resolveLocalFileSystemURL上收到错误