The script file is rendered from server side, and when I using the code as below to download data from the script
const blob = new Blob([data]);
var a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "1.mp4";
a.click();
URL.revokeObjectURL(a.href);
it shows that document is not defined. Is there any way to solve this problem?