Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the file picker to show only custom file extension #74

Open
sschuberth opened this issue Mar 8, 2024 · 3 comments
Open

Allow the file picker to show only custom file extension #74

sschuberth opened this issue Mar 8, 2024 · 3 comments

Comments

@sschuberth
Copy link

It seems like currently there's no way to only display files matching custom extensions in the picker. In my case, I'd like only *.json and *.yml files to show up for picking. Is this a functionality that could be added?

@MohamedRejeb
Copy link
Owner

For now only custom mime types are supported, but I will add custom extensions in the future.
You can use:

FilePickerFileType.Custom(
    listOf(
        "application/json",
        "application/x-yaml",
    ),
),

@sschuberth
Copy link
Author

"application/x-yaml"

Thanks, but I guess this will also allow to select *.yaml whereas I really only want *.yml, correct?

@MohamedRejeb
Copy link
Owner

Yes, you can search for a specific mime type for that extension. I will try to add extensions support ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants