03-31-2024 07:40 AM
Hi, guy's.
const json = JSON.stringify(someJson);
const blob = new Blob([json], {type: 'application/json'});
const url = URL.createObjectURL(blob);
const a = linkElement; // HTMLAnchorElement
a.href = url;
a.text = url.toString();
a.download = 'some-file-name';
When i click on link nothing happened.
Without "download" property this link open like a document.
Thank you for help
03-31-2024 09:03 AM
i found "solution" - any files is downloading silently (without any warns for user).
I prefer for browser somehow warn me about any downloading. But in general its work.