richrichDev commented on issue #291: URL: https://github.com/apache/cordova-plugin-file-transfer/issues/291#issuecomment-970179841
for anyone struggling with this , use this solution : modify FileTransfer.java as follow : - means remove line of code + means add line of code ` - import org.apache.cordova.Whitelist; +import org.apache.cordova.AllowList; - Boolean shouldAllowRequest = null; - if (isLocalTransfer) { - shouldAllowRequest = true; - } - if (shouldAllowRequest == null) { - try { - Method gwl = webView.getClass().getMethod("getWhitelist"); - AllowList whitelist = (AllowList)gwl.invoke(webView); - shouldAllowRequest = whitelist.isUrlAllowListed(source); - } catch (NoSuchMethodException e) { - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { - } - } + Boolean shouldAllowRequest = null; + if (isLocalTransfer) { + shouldAllowRequest = true; + } + if (shouldAllowRequest == null) { + try { + Method gwl = webView.getClass().getMethod("getWhitelist"); + AllowList whitelist = (AllowList)gwl.invoke(webView); + shouldAllowRequest = whitelist.isUrlAllowListed(source); + } catch (NoSuchMethodException e) { + } catch (IllegalAccessException e) { + } catch (InvocationTargetException e) { + } + } ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org