I'm facing an issue while trying to use the Cordova File Transfer API to upload a file while the Worklight Development Server is running in HTTPS.
I created a certificate with a valid CA and put it in the server, as well as imported it to the the Android Emulator.
I'm able to login to the application and download data using the File Transfer API, but when I try to use it for uploading data I'm getting the below message in LogCat.
The code is calling a servlet implemented with our WL application to execute the download and upload.
11-26 09:20:27.854: E/FileTransfer(2362): {"target":"https:\/\/my-ip-address\/APP\/appServlet","source":"file:\/\/\/storage\/sdcard\/anywhere\/wilson\/app2\/it_1305\/1416946570255.jpg","http_status":0,"code":3}
11-26 09:20:27.854: E/FileTransfer(2362): java.io.IOException: Hostname 'my-ip-address' was not verified
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:146)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.Connection.connect(Connection.java:106)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:287)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:248)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:197)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:383)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
11-26 09:20:27.854: E/FileTransfer(2362): at com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:179)
11-26 09:20:27.854: E/FileTransfer(2362): at org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:388)
11-26 09:20:27.854: E/FileTransfer(2362): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-26 09:20:27.854: E/FileTransfer(2362): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-26 09:20:27.854: E/FileTransfer(2362): at java.lang.Thread.run(Thread.java:841)
11-26 09:20:27.854: E/FileTransfer(2362): Failed after uploading 0 of 18725 bytes.