【发布时间】:2015-11-16 10:02:30
【问题描述】:
我一直在我们的混合 html 应用程序中使用文件传输插件,它支持寡妇 8.1 和 ios 和 android,但我还需要它在 Windows 10 商店应用程序中工作。它似乎无法在 Windows 10 中下载文件,请建议一些替代插件从服务器下载文件,或者如果我们在 Windows 10 中完成这项工作
下面的示例代码
var fileTransfer = new FileTransfer();
var uri = encodeURI("some_url.com");
var fileName = "localpathofwindows"
fileTransfer.download(uri, fileName,
function(entry) {
console.log("file download success");
},
function(error) {
console.log("file download failure");
},
false, {
headers: {
"Authorization": auth,
"action": "getFiles"
}
});
【问题讨论】:
-
fileTransfer.download() 给你回调了吗?
-
cordova 文件传输已被弃用,因为您可以直接使用文件下载:cordova.apache.org/blog/2017/10/18/…
标签: javascript cordova sencha-touch windows-10-universal