When initially shipping the File System Access API we shipped a bare minimum API surface for showing file and directory pickers. We're now proposing adding a couple of frequently requested (and commonly supported in other file picker APIs) options to let websites provide a couple more opportunities to influence the behavior of the file and directory pickers. In particular we want to let websites give suggestions for the name and location of files and directories that are being saved or loaded.
If other browsers do not implement these new options (but do implement the rest of the File System Access API), users of websites using these new options will have a lesser user experience in such browsers. Websites will still be fully functional, but more work might need to be done by the user to open/save files in the directories they meant to, or with the file names they intended to use.
This API should be ready to use as-is. Implementations that don't support these new features will simply ignore them, with no website-visible difference (the only difference will be user-visible).
The suggestedName feature would let a website suggest potentially dangerous filenames. Implementations should (and our implementation does) employ the same practices as for example suggested file names for downloads, and sanitize suggested names. Besides that, all these features are explicitly merely hints to the user agent how the UI should behave in a way that improves the user experience, but if particular values for these options are considered a security risk, a user agent can ignore or sanitize that input as well.
LGTM1This seems like a reasonable and helpful usability addition to the already exposed API.
On Wednesday, March 31, 2021 at 8:55:50 PM UTC+2 Austin Sullivan wrote:
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/13d693a8-885d-4958-99cc-c6182676d51an%40chromium.org.
LGTM2
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLn4S0CY-5-tKgqH251O%2BqiiYeYWNFv5jWHHcP8--7wQxA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/463d1eda-12ed-4f80-1237-72eebb14c8d6%40gmail.com.