breautek commented on PR #889: URL: https://github.com/apache/cordova-plugin-camera/pull/889#issuecomment-2236851710
I've done a bit more testing using content urls and wanted to follow up with some more details. Using content urls directly simply doesn't work and I still don't know why. Using `resolveLocalFileSystemURL` on a content url does work and you can then use `toURL()` on the entry object to obtain an asset loader will yield a "valid" https url. This however still doesn't work and is likely a bug inside cordova-android core platform. Filesystem does have some support for using file APIs against content urls, though permissions may limit the actions you can take on content uri sources, but I've tested the following: - Using the FileReader to obtain a data uri and/or blob will allow you to use the asset in the DOM. - You can also use `copyTo` (with a caveat) to copy the content from the content filesystem into the local app-data for more persistent access. First caveat is content urls have a filename that contains a `:` character which apache file apis deems illegal, so a new file name must explicitly be supplied when using `copyTo`. The second caveat is content urls give temporary access. The url cannot be saved to be used later. Once the app exits, the read grants provided to the app is expired, and attempting to read it again will result in a security exception. But this might actually make the content path usage viable, especially if we can fix the asset loader in cordova-android. -- 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