breautek commented on issue #647:
URL: 
https://github.com/apache/cordova-plugin-file/issues/647#issuecomment-2769551704

   > so I discovered that in 8.1.3, cordova.file.documentsDirectory uses 
app://localhost/_app_file_/ instead of file:///. 
   
   the file constants have not changed in 8.1.3 and re-testing this in a simple 
sample application confirms this with me.
   
   
![Image](https://github.com/user-attachments/assets/082c0262-4209-4e85-bd7a-b1ad1dfd7e77)
   
   in 8.1.3, the `FileEntry.toURL()` method was changed to respect the scheme, 
as it's suppose to produce a DOM-usable URL which it never did on iOS since 
cordova-ios@6 (due to limitations of WKWebView). So 8.1.3 fixes this by 
returning a `file://` if the webview is hosted on a `file://` path, or the 
app-scheme if the app is configured to use app schemes, so that URLs can be 
embedded into the HTML document.
   
   Prior to this, `FileEntry.toURL()` always returned a `file://` on iOS 
(inconsistent with Android implementation), so if you were using this with the 
file-transfer plugin then I don't think that is right. If a `file://` path is 
desired for native interactions, then the `entry.nativeURL` will always return 
a `file://` path on iOS. Android may return a `content://` path depending on 
the underlying source of the asset.
   
   Let me know if this information helps.


-- 
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

Reply via email to