spotlight icon indicating copy to clipboard operation
spotlight copied to clipboard

Download control not working in different domain

Open popcornkiller1088 opened this issue 4 years ago • 0 comments

Download control not working in different domain, it will blocked by CORS and open the image in tab instead, please change download image function in helper.js

    fetch(src)
        .then(response => response.blob())
        .then(imageBlob => {
            const imageObjectURL = URL.createObjectURL(imageBlob);
            const link = /** @type {HTMLAnchorElement} */ (createElement("a"));
            link.href = imageObjectURL;
            body.appendChild(link);
            link.click();
            body.removeChild(link);
        });

popcornkiller1088 avatar Oct 29 '21 10:10 popcornkiller1088