Closed Bug 793962 Opened 13 years ago Closed 13 years ago

"Save Image As" fails when trying to save a blob

Categories

(Core :: DOM: Core & HTML, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jaws, Unassigned, NeedInfo)

Details

Timestamp: 9/24/2012 10:11:34 PM Error: uncaught exception: Load of blob:e764d021-10d1-4c2b-85fd-ff044a0347f8 from https://people.mozilla.com/~anarayanan/gum_test.html denied. STR: Go to gUM Test Page at https://people.mozilla.com/~anarayanan/gum_test.html Take a picture Right click on picture and choose "Save Image As..." Also: "View Image" and "View Image Info" also fail with the same error. Using "Copy Image Location" and navigating to that page also produces an error.
Blobs are document-specific, no? They can't really be used outside the context of the one document they belong to....
The problem is not that the blob URL can't be used outside of the context of the document. It's based on principals, so chrome can load a blob URL for a content blob (assuming it can get said URL in the first place). The problem is that the page calls RevokeObjectURL in the onload handler of the image, so by the time you click Save Image As the URL is no longer valid.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Also it's intentional that this looks like a security error, so that you can't observe which blob URIs are valid and which ones are not.
Thanks for the feedback, I filed bug 794283 to hide these context menuitems for blobs now.
Component: DOM → DOM: Core & HTML

I think this bug should be reopened.

Reasoning:
a) The statements regarding "blob context" or "RevokeObjectURL" seem outdated, see for example bug 1628608. In the example given there, the blob-URL can even be pasted to a new tab and its content is displayed.
b) An increasing number of web pages use blobs to show images. The context-menu (right click) options "Save image as...", "Copy image" and "Email image..." therefore need to be working on blobs, too.

Hi Daniel, can you file a new bug with a test-case? I'd be happy to take a look, feel free to ni? me.

Flags: needinfo?(bugzilla)
You need to log in before you can comment on or make changes to this bug.