Closed Bug 595838 Opened 14 years ago Closed 14 years ago

FileReader.readAsDataURL throw access exception with local drag'n drop files

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 594964

People

(Reporter: ochameau, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100912 Firefox/4.0b6pre
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100912 Firefox/4.0b6pre

In current nightlies we are no more able to drag'n drop local files and handle them with FileReader API.
Instead we get "Access to restricted URI denied"  NS_ERROR_DOM_BAD_URI exception on FileReader.readAsDataURL.
So we can't retrieve the local url of the file!

This demo works on Firefox4 beta 5, but not on current nightlies.

Note: on the other hand the new File.url attribute is currently crashing the browser when I try to read it.
https://developer.mozilla.org/en/DOM/File


Reproducible: Always

Steps to Reproduce:
1. open http://demos.hacks.mozilla.org/openweb/DnD/
2. drag a local file to the drop zone (an image for example)
3. see this demo failing with ""Access to restricted URI denied - NS_ERROR_DOM_BAD_URI" error in the JS console

Actual Results:  
Exception on readAsDataUrl

Expected Results:  
Success handling of dropped file in readAsDataURL.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.