I want to save a file with data input by the user on a website to the user's device using showSaveFilePicker()
in Javascript (purely locally used).
This is currently not supported by all browsers, especially not on mobile devices.
I need a way to check, if the browser used is offering showSaveFilePicker()
, so that I can offer a download to the standard folder if showSaveFilePicker()
is not available.
How can I check for that?
Using try-catch
does not work, as the error will also be thrown when the user aborts saving - which should of course not lead to a saving of the file.