I don't see a verifier when I look at the API results either, at least not with the couple I tested.
If you are working with JavaScript, you could use the URL to create an anchor tag that opens in a new tab and then simulate a click on it. After clicking it you could remove the anchor tag.
function downloadCanvasFile(url) {
let downloadAnchor = document.createElement("a");
downloadAnchor.href = url;
downloadAnchor.target = "_blank";
document.body.appendChild(downloadAnchor);
downloadAnchor.click();
document.body.removeChild(downloadAnchor);
}
downloadCanvasFile("https://<canvas>/files/<id>/download?download_frd=1");
If you want to rename the file before downloading, you can use the download attribute, but you will also have to strip away the download part of the URL after the id.
function downloadCanvasFile(url, filename) {
let downloadAnchor = document.createElement("a");
downloadAnchor.href = url;
downloadAnchor.download = filename;
downloadAnchor.target = "_blank";
document.body.appendChild(downloadAnchor);
downloadAnchor.click();
document.body.removeChild(downloadAnchor);
}
downloadCanvasFile("https://<canvas>/files/<id>/download?download_frd=1", "desiredFilename.fileExtension");
I only tested in Chrome, so I'm not sure if this is fully supported in other browsers.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.