HTML pages cannot include filesystem: resources
Reported by patrick....@gmail.com, Jul 14 2011
Chrome Version : 14.0.803.0 OS Version: Ubuntu 11.04 URLs (if applicable) : Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 5: not tested yet. Firefox 4.x: N/A IE 7/8/9: N/A What steps will reproduce the problem? See the attached script for an example. If you do not have a local webserver, I recommend pasting the contents of the script into the devtools console of an open page. The script does the following: - Create an image in the HTML5 filesystem - Create a HTML file which references the image, saved to the filesystem. 1. Run the script. 2. After running the script, open the popup window or browse to filesystem:<domain>/temporary/test.html 3. Browse to filesystem:<domain>/temporary/image.svg What is the expected result? Both test.html and image.svg should show the image. What happens instead? The image shows up when browsing to it directly. However, it is not visible when included using an <img> tag. If you attempt to include it using an <iframe>, the iframe's URL remains about:blank (the navigation is blocked). Also, right clicking on the placeholder for the img tag does not show the image-specific context menu. I don't understand why filesystem: prohibits embedding local resources. If the filesystem: protocol is not meant to be used to include resources, why is it accessible at all? Please provide any additional information below. Attach a screenshot if possible. I am trying to develop an extension that generates images and allows the user to browse through the generated files. While this is still possible by manually reading images and using a data uri, I'm worried about the performance implications if my extension is used to store thousands of images, for example. What I described above *almost* works if I instead access file:///home/username/.config/google-chrome/Default/File%20System/002/p/00/ -- and guess the filenames by creation order (which will work 99% of the time, but I'm afraid about the other 1%) I may file this as a separate bug, but as a workaround, I wanted to tell the user to save the images manually, but Save As is disabled on filesystem: urls. Is this deliberate? (Again, data: uris work, but they use a random filename.) UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.803.0 Safari/535.1
Oct 24 2011,
Issue 100936 has been merged into this issue.
Oct 24 2011,
Oct 26 2011,
I'll be back off leave next week, and working on filesystem URL stuff as soon as TPAC's over. The change I'm working on now will fix this problem.
Jan 30 2012,
Jan 30 2012,
I've got the first chunk [of 3] of my big GURL rewrite in [the patch spans 3 repositories]. I hope to have the whole thing in within a couple of weeks. It may or may not fix this bug [I'll have to check], but this bug will be very high on my priority list as soon as this megapatch is in. Sorry about the delay.
Feb 3 2012,
Is there a workaround/polyfill for this in the mean time? I want to mimic AppCache functionality with the filesystem API so I can rewrite the local files without hitting the server.
Feb 3 2012,
(Note: it seems that using an absolute URL like <img src="filesystem:http://example.com/temporary/foo.png"> works.)
Feb 10 2012,
hey @jeremya it seems like we are trying to do the same thing. I wrote an ugly monkey patch that uses jQuery and jsuri (http://code.google.com/p/jsuri/) to walk the dom of html files and replaces all relative urls with absolute urls. Its ugly but it was working for a bit, until I hit another bug, see: http://code.google.com/p/chromium/issues/detail?id=113597&thanks=113597&ts=1328863621
Feb 15 2012,
Apr 4 2012,
Mar 11 2013,
Apr 6 2013,
Sign in to add a comment