Closed Bug 572139 Opened 10 years ago Closed 10 years ago

File.url from a dropped file doesn't work as source for images


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

Windows 7
Not set



Tracking Status
blocking2.0 --- betaN+


(Reporter: paul, Assigned: sicking)



Setting the src attribute of an image element with the url property of a File object doesn't work.

See the test here:
This worksforme if I select the file using an <input type="file">.  And for the drop case, if I look at my error console I see:

  Security Error: Content at
  may not load data from moz-filedata:ab11527f-ad10-2a41-928f-50a676a4a381.

So presumably we're not giving dropped files the principal of the page we drop into.  Perhaps we should.
Summary: File.url doesn't work as source for images → File.url from a dropped file doesn't work as source for images
Thanks for finding this. We should indeed give dropped files the correct principal.
Assignee: nobody → jonas
blocking2.0: --- → beta2+
blocking2.0: beta2+ → betaN+
Duplicate of this bug: 581767
Any update here? I'd like to use File.url in my coming demos :)
Just a note to say that I get this crash every time I try to use File.url
(on last nigthlies)
I am still waiting since the post on
Kyle, does your patch for bug 594964 fix this?
This should be fixed now, though the syntax is no longer file.url.
Closed: 10 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.