Open cfjedimaster opened 9 years ago
We were debating this not too long ago. I think we should use the file protocol as well just because it's directly useable by the File API if anything. The current path (with no file:// prefixed) should still work in the browser though…
Ah, to be fair, I didn't try to do use the value directly as an img src. When I saw the / path, I just assumed it wouldn't work.
On Wed, May 20, 2015 at 5:45 PM, Anis Kadri notifications@github.com wrote:
We were debating this not too long ago. I think we should use the file protocol as well just because it's directly useable by the File API if anything. The current path (with no file:// prefixed) should still work in the browser though…
— Reply to this email directly or view it on GitHub https://github.com/phonegap/phonegap-plugin-contentsync/issues/21#issuecomment-104064785 .
Raymond Camden, Developer Advocate for MobileFirst at IBM
Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden
file:// is not portable to all devices. Something like: cdvfile://localhost/persistent would make more sense. This seems more like a question than an issue ...
Each platform should be free to use whatever path works best. There should be no guarantee that the same path will be used by all platforms, since each platform can store the assets in different places.
The only requirement is that the returned path can be correctly referenced in the web browser (as a linked URL, image source, etc).
not sure if this will persist but we're using wkwebview plugin and thus we need to be able to convert the localPath
to a http
one from the local server too
The docs for data.localPath say this, "However, it is guaraneteed to be a compatible reference in the browser."
Is that really true? data.localPath was a full path, /stuff/stuff/stuff, not a file:// path, so technically it isn't addressable by the browser.