Sunil Agrawal
Sunil Agrawal

Reputation: 679

Reading content of Blob URI from Firefox extension

I am developing a Firefox extension in Javascript and have the need to read the contents of a Blob URI (e.g. URI of the form blob:488ab243-e325-49f7-b981-b904bd829c48).

My extension works on simple test page, but when I run my Firefox extension on Google Drive, I get the error 'Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"'

I assumed that the Firefox extension has all the privileges, so why the error 'Access to restricted URI denied'? Does anyone have any clues? Is there a way I elevate my privilege even higher?

Upvotes: 1

Views: 200

Answers (1)

Sunil Agrawal
Sunil Agrawal

Reputation: 679

Never mind, the reason for the error was the Blob URI was getting 'revoked' before the extension got a chance to read it's contents. If it doesn't get revoked, the extension is able to read it.

Upvotes: 1

Related Questions