From 750dcc71c696fce4bb1648163c5481b8c2ad0014 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 8 Oct 2018 13:29:54 +0530 Subject: [PATCH] Add HTTPS support for file upload/download --- .../public/js/operation-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js index c5fdd4a53..659ec3042 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/public/js/operation-bar.js @@ -282,7 +282,7 @@ function validateFileTransferParameters(payload) { returnVal = "Please enter File URL"; } else if (!payload.upload && !payload.fileURL) { returnVal = "Please enter the URL to upload file from device"; - } else if (protocol === "HTTP" && !(payload.fileURL).startsWith("http:")) { + } else if (protocol === "HTTP" && !(payload.fileURL.startsWith("http:") || payload.fileURL.startsWith("https:"))) { returnVal = "Please enter HTTP URL" } else if (protocol === "FTP" && !(payload.fileURL).startsWith("ftp:")) { returnVal = "Please enter FTP URL"