When using rememberFileSaverLauncher, it doesn't display a dialog allowing you to pick the directory and file name
If I use rememberFileSaverLauncher in Desktop compose, it will pop up a dialog allowing me to pick the directory and file name to save to.
In the browser version, it just saves straight to the downloads folder.
I'm not sure if this is platform specific behaviour (if so no problem) or a bug.
Hi! Yes it's actually the right behavior. On the web, there is no wide adopted way to open a file saver dialog on every browser. We can only save a file in the download folder.
But the behavior of FileKit is improvable. The best IMO is to be able to open a file saver dialog on platforms that support this feature (everything except web targets) to select the file name and location but without saving anything. It will return a PlatformFile. On PlatformFile, it will exist a new method saveBytes that actually saves bytes to that file and will be accessible from web targets.
So probably in the future, I'll remove the bytes parameter from rememberFileSaverLauncher method and rememberFileSaverLauncher will be only accessible on everything except web targets.
In the latest FileKit version, I remove / deprecate the possibility to open the file picker from web targets. Instead, there is a new download() function for web targets that enables you to download files.
Read more here: https://filekit.mintlify.app/dialogs/file-saver#download-file-on-the-web