Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using rememberFileSaverLauncher, it doesn't display a dialog allowing you to pick the directory and file name #111

Open
frayneposset opened this issue Sep 10, 2024 · 1 comment
Labels
next Scheduled for the next version

Comments

@frayneposset
Copy link

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.

@vinceglb
Copy link
Owner

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.

@vinceglb vinceglb added the next Scheduled for the next version label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next Scheduled for the next version
Projects
None yet
Development

No branches or pull requests

2 participants