Fixing anchoring proof pdf

This commit is contained in:
Maxime Lalo 2023-09-26 16:48:44 +02:00
parent 2bd625c531
commit 5f0b165e6b

View File

@ -277,7 +277,16 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
if (anchor.transactions[0].status !== "VERIFIED_ON_CHAIN") return; if (anchor.transactions[0].status !== "VERIFIED_ON_CHAIN") return;
try { try {
await OfficeFolderAnchors.getInstance().download(uid); const file: Blob = await OfficeFolderAnchors.getInstance().download(uid);
const url = window.URL.createObjectURL(file);
const a = document.createElement("a");
a.style.display = "none";
a.href = url;
// the filename you want
a.download = "anchoring_proof.pdf";
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }