【发布时间】:2018-12-10 06:30:41
【问题描述】:
我正在尝试将FileTransfer.upload() 发送到我们的测试服务器,该服务器具有使用 Cordova 1.8.1 的自签名证书
以下代码在 Android 上运行良好,但在 iOS 上不运行。
var debug = true;
var uploadurl = "https://my.host.com/upload/file/here";
ft.upload(nImageURI, uploadurl, win2, fail, options, debug);
上传方法中的debug=true是undocumented debug feature。
我仅在 iOS 上收到以下错误。 Android 运行良好。
FileTransferError {
code = 3;
"http_status" = 0;
source = "https://my.host.com/upload/file/here";
target = "file:///var/mobile/Applications/1124016F-4FEE-400E-9AF1-2E2195EED1AF/myApp.app/www/index.html";
}
File Transfer Error: The certificate for this server is invalid. You might be connecting to a server that is pretending to be ‚Äúhttps://my.host.com/upload/file/hereÄù which could put your confidential information
【问题讨论】:
标签: cordova https upload file-transfer