breautek commented on PR #381: URL: https://github.com/apache/cordova-plugin-file-transfer/pull/381#issuecomment-2679663803
> urls returned by Entry.toURL() are not anymore in 'file://' format, `.toURL()` returns a DOM-usable URL, which could be `file://` for non-scheme based webviews, or `http(s)://` on android, or `app://` (or a chosen configured custom scheme name) on iOS. Historically I think `toURL()` returned `cdvfile://` urls, but got changed due to cross-origin limitations that appeared in WKWebView and modern android webview environments. I believe file transfer plugin technically still accepts `cdvfile://` urls, so perhaps there is old documentation recommending the use of `entry.toURL()` but if that is the case, I think the docs should be updated. `cdvfile://` usage has been decommissioned for quite some time now. `.toURL()` returns a transformed URL that can be parsed by the DOM and intercepted by the webview to find the relevant resource. iOS and android has different requirements here, so the URL returned will vary by platform. Entry objects have the original underlying property stored, I believe it's under `.nativeURL` (as a property, not a function). So I feel like the better approach is to make sure documentation are up to date with current standards, and for application code to use the proper method/properties depending on their use case. -- 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: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org