With File System Access API, we can save file to disk!
In this demo, i am using .txt to demonstrate but any file can be
used.
The File System Access API (formerly known as Native File System API
and
prior to that it was
called Writeable Files API) enables developers to build powerful web apps that interact with
files
on
the user's local device, like IDEs, photo and video editors, text editors, and more. After a
user
grants
a web app access, this API allows them to read or save changes directly to files and folders on
the
user's device. Beyond reading and writing files, the File System Access API provides the ability
to
open
a directory and enumerate its contents.