To improve security, the File System Access API's showOpenFilePicker() and showSaveFilePicker() methods will limit what characters are allowed in extensions for accepted file types. Specifically only A-Z, a-z, 0-9, + and . will be allowed, extensions can't end in .local or .lnk, and can't be more than 16 characters long.

Motivation

Especially in save dialogs there is danger in allowing arbitrary code points in file extensions/suffixes. Certain suffixes have special meaning or behavior on certain platforms. For predictibality purposes we enforce the same restrictions on all platforms.

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>Storage>FileSystem


Enabled by default

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2021-02-22