Intent to Ship: Suggested file name and location for the File System Access API

84 views
Skip to first unread message

Austin Sullivan

unread,
Mar 31, 2021, 2:55:50 PM3/31/21
to blink-dev, Marijn Kruisselbrink

Contact emails

m...@chromium.orgasu...@chromium.org

Explainer


https://github.com/WICG/file-system-access/blob/main/SuggestedNameAndDir.md

Specification

https://github.com/WICG/file-system-access/pull/287

API spec

Yes

Summary

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.



Blink component

Blink>Storage>FileSystem

TAG review

https://github.com/w3ctag/design-reviews/issues/598

TAG review status

Issues addressed

Risks



Interoperability and Compatibility

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.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/154#issuecomment-805091883)

WebKit: Negative (https://lists.webkit.org/pipermail/webkit-dev/2020-August/031362.html) Safari is not supportive of the File System Access API in general.

Web developers: Positive These are some of the most frequently requested features, see https://github.com/WICG/file-system-access/issues/80https://github.com/WICG/file-system-access/issues/85https://github.com/WICG/file-system-access/issues/94 and https://github.com/WICG/file-system-access/issues/144

Activation

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).



Security

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.



Is this feature fully tested by web-platform-tests?

No

Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/6013006146174976

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rF4%3D8Y7MuRBw1JJtkHRY%3DG_Huh4GSus%3Dfbju1B3wAPR8A%40mail.gmail.com?utm_medium=email&utm_source=footer


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Apr 1, 2021, 4:36:44 AM4/1/21
to blink-dev, Austin Sullivan, Marijn Kruisselbrink
LGTM1
This 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:

Thomas Steiner

unread,
Apr 1, 2021, 4:48:54 AM4/1/21
to Yoav Weiss, blink-dev, Austin Sullivan, Marijn Kruisselbrink
Non-owner LGTM. This is highly anticipated by developers and closes the gap with `<a download="yolo.txt">`. Thanks for adding this feature!

On Thu, Apr 1, 2021 at 10:36 AM Yoav Weiss <yoav...@chromium.org> wrote:
LGTM1
This 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.


--
Thomas Steiner, PhD—Developer Advocate (https://blog.tomayac.com, https://twitter.com/tomayac)

Google Germany GmbH, ABC-Str. 19, 20354 Hamburg, Germany
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.23 (GNU/Linux)

iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck0fjumBl3DCharaCTersAttH3b0ttom.hTtPs://xKcd.cOm/1181/
-----END PGP SIGNATURE-----

Daniel Bratell

unread,
Apr 1, 2021, 8:33:50 AM4/1/21
to Thomas Steiner, Yoav Weiss, blink-dev, Austin Sullivan, Marijn Kruisselbrink

Chris Harrelson

unread,
Apr 1, 2021, 2:52:31 PM4/1/21
to Daniel Bratell, Thomas Steiner, Yoav Weiss, blink-dev, Austin Sullivan, Marijn Kruisselbrink
Reply all
Reply to author
Forward
0 new messages