Open Bug 1318564 Opened 8 years ago Updated 2 months ago

downloads.download doesn't accept data URI

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(firefox53 affected)

Tracking Status
firefox53 --- affected

People

(Reporter: masayuki, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: triaged)

browser.downloads.download({ "url": "data:,", filename: "something" }); fails with following error: > Type error for parameter options (Error processing url: Error: Access denied for URL data:,) for downloads.download. Looks like that downloads.download don't support data URI but this is necessary when saving something in <canvas> to local file.
You can use a blob for this, for example: let blob = URL.createObjectURL(new Blob([output.join('\n')])); browser.downloads.download({url: blob, filename: 'something'});
Indeed, thank you for suggesting the workaround. However, I still feel it's a bug.
Component: WebExtensions: Untriaged → WebExtensions: General
Priority: -- → P5
Whiteboard: triaged
Product: Toolkit → WebExtensions
Depends on: 1622986
Severity: normal → S3
Duplicate of this bug: 1933304
You need to log in before you can comment on or make changes to this bug.