Update dialog.md with info about filter extensions
There was some confusion about the correct way to add an `All Files` filter (see #2525), so I added it to the example. Also added a short note about the extension syntax. This is related to PR #2547.
This commit is contained in:
parent
d7cf460918
commit
db2f0a68e8
1 changed files with 3 additions and 1 deletions
|
@ -36,10 +36,12 @@ selected, an example is:
|
||||||
filters: [
|
filters: [
|
||||||
{ name: 'Images', extensions: ['jpg', 'png', 'gif'] },
|
{ name: 'Images', extensions: ['jpg', 'png', 'gif'] },
|
||||||
{ name: 'Movies', extensions: ['mkv', 'avi', 'mp4'] },
|
{ name: 'Movies', extensions: ['mkv', 'avi', 'mp4'] },
|
||||||
{ name: 'Custom File Type', extensions: ['as'] }
|
{ name: 'Custom File Type', extensions: ['as'] },
|
||||||
|
{ name: 'All Files', extensions: ['*'] }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
The `extensions` array should contain extensions without wildcards or dots (e.g. `'png'` is good, `'.png'` and `'*.png'` are bad). To show all files, use the `'*'` wildcard (no other wildcard is supported).
|
||||||
|
|
||||||
If a `callback` is passed, the API call would be asynchronous and the result
|
If a `callback` is passed, the API call would be asynchronous and the result
|
||||||
would be passed via `callback(filenames)`
|
would be passed via `callback(filenames)`
|
||||||
|
|
Loading…
Reference in a new issue