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

   If you're app is configured to use schemes (e.g. your html page is loaded 
over `http(s)://...` on android or `app://...` (the scheme is customizable on 
iOS) then using `file://` paths in your DOM will likely get blocked by CORs. If 
you're app is loaded over the `file://` protocol, then using `file://` paths in 
the DOM should work as expected but is considered less secure.
   
   v7 (if I recall correctly) of the file plugin introduce changes to produce a 
DOM-usable url when using the `FileEntry.toURL()` method.
   
   The pasted code is not well formatted and is hard to read but here are some 
things to check:
   
   1. Make sure 
[.toURL()](https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#upgrading-notes)
 is being used.
   2. The ionic webview may not parse the URL produced by `.toURL()` properly, 
so if the ionic webview is being used, attempt to test using the default 
cordova webview.
   
   If it still doesn't work, please let us know what version of `cordova-ios` 
you're using and whether you're using schemes or loading directly the `file://` 
protocol.


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