Open Bluebugs opened 2 years ago
This link point to some easy to implement solution to locally generate a file and save it: https://stackoverflow.com/questions/52683706/how-can-one-generate-and-save-a-file-client-side-using-blazor
Current idea would be to not have a dialog implemented per see for saving, but it will return in memory file which will trigger a []byte -> base64 -> download link on the URI being closed. This would lead to the file being saved locally by the browser.
Maybe slight intermediate step would be to propose typing a file name before returning the uri.
Maybe slight intermediate step would be to propose typing a file name before returning the uri.
I guess not all browsers offer the user get a chance to set the filename when the download dialog opens... The default can be set in the file dialog API but a reasonable fallback does need to be provided.
At least for the browser I use, Firefox, Chrome and Edge, there is no dialog to choose the file to save in. The file is named by the website and downloaded straight into Downloads/.
Is your feature request related to a problem? Please describe:
The web doesn't come with a file save dialog feature. You are expected to download a file. It would be nice to have that capability working seamlessly as if it was a on the desktop.
Is it possible to construct a solution with the existing API?
Ideally no new API should be added.
Describe the solution you'd like to see:
No idea yet.