I am looking for file saving ( in my local file system) functionality in Angular. I already gone through following modules.
Angular-file-saver
But it asked for confirmation before saving file.
I want my file to saved automatically in my local folder ( C:\MyApplication\contents)
FileSaver.saveAs(new Blob([data], { type: "video/mp4" }), 'C:\MyApplication\contents\myvideo.mp4');
Any pointers would be really helpful.
I think the best way is to handle it yourself.
Create a blob from your data.
myBlob = new Blob([new Uint8Array(myData)], {type: "octet/stream"});
Now create <a>
element in the memory and click on it.
var link = document.createElement('a');
link.href = window.URL.createObjectURL(myBlob);;
link.click();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With