javascript - Changing blob url to download link -
I am trying to create a download link from a blank URL. I want to add the correct file extension which I have saved in a variable.
The link link below does not open if I enter the Blob URL separately, then it opens the file without the correct detail, but of course.
I think the click () may be a problem ... but why?
Please help
console.debug (objectURL); // blob: http% 3A // localhost% 3A8080/46E5BD5-AA1B4 9 9-9 7-BC-0552FBDD 41803 var A = document. Create element ("A "); Document.body.appendChild (a); A.style = "Display: None"; A.download = 'myFile' + file extension; A.href = objectURL; A.click ();
Comments
Post a Comment