Open core-ai-bot opened 3 years ago
Comment by abose Wednesday Mar 25, 2015 at 10:30 GMT
I see that file:/// is also used in LiveDevolopment-tests.js, and some other fils too (12 from a find in files search). Have to look at this. But wait; did i just read that you are running brackets in a web browser :open_mouth:
Comment by humphd Wednesday Mar 25, 2015 at 14:17 GMT
Yeah, there are other places, but not that really affect my use case, and are probably safe to leave (e.g., in cases where you're running node).
Yes, we have it working in browser, you can play with it at http://humphd.github.io/brackets/dist/
Comment by humphd Wednesday May 20, 2015 at 17:36 GMT
I fixed this in our fork, but using a caching layer that doesn't exists in Brackets proper. The commit is here for reference: https://github.com/humphd/brackets/commit/c03ed580bc9e3bfeba995e379ec5ca3f6d0d2481
Issue by humphd Monday Mar 23, 2015 at 20:39 GMT Originally opened as https://github.com/adobe/brackets/issues/10787
Brackets' Filesystem implementation is swappable, which is great, and let's one run in environments other than a native appshell. For example, I'm using an
IndexedDB
/WebSQL
backed filesystem to run Brackets in a browser, and things mostly "Just Work." However, there are still aspects of the code that assume resources are available via a local, native filesystem, the worst being uses offile:///
URIs for loading resources like images.A better solution is to use the Filesystem to load the resource into a BLOB, and then create a URL Object that can be used with
img.src
and the like. This is how I get the LiveDev to work in the browser, by having the LiveDev server pre-fetch filesystem resources and turn them into BLOBs and URL Objects that can be "served" to an iframe-based browser.Some of the places that need this fix include:
QuickView:
Image View:
The down side is that getting the URL becomes an asynchronous operation because it now depends on reading from the filesystem. But doing so would mean that Brackets can work unchanged on top of any filesystem implementation.