Skip to content

馃悰 Firefox 馃 Image download fails

In Firefox, attempting to download an image fails.

This is due to a recent bug in Mozilla, see downloads.download cannot download blob:-URLs created in content scripts/web pages, Error: Access denied for URL blob:http

Basically, Zendesk serves images as blobs when you download them, but the Mozilla API does not support blob downloads that are created via the downloads.download API.

The immediate concern is images can't be downloaded. I will create a fix to allow the image to be downloaded, but not routed.

This code produces the following:

# end of completeFirefoxDownload() function

// Start a new download with the routed path
browser.downloads.download({ 
    filename: items.download_path + items.download_filename,
    url: url
}, function(download) {
    browser.downloads.onChanged.addListener(function (download) {
        console.log(download.state);
    });
                
});

Background script debugger:

Security Error: Content at moz-extension://xxxxxxxxxxxxxxxx/_generated_background_page.html may not load data from blob:https://yyyyyy.zendesk.com/zzzzzzzzzz.

Uncaught (in promise) Error: Type error for parameter options (Error processing url: Error: Access denied for URL blob:https://yyyyyy.zendesk.com/zzzzzzzzzz) for downloads.download.
    completeFirefoxDownload moz-extension://xxxxxxxxxxxxxxxx/js/background.bundle.js:2868
Edited by Anton Smith
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information