miguelpruivo / flutter_file_picker

File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.
MIT License
1.35k stars 673 forks source link

FilePicker.platform.pickFiles with FileType.custom does not allow picking filetype #1585

Closed auradigitaldev closed 2 months ago

auradigitaldev commented 2 months ago

Describe the bug A clear and concise description of what the bug is. If the issue happens to be on Android, please make sure that it also happens with a different device/simulator and/or version.

Platform

Platform OS version Android 14

How are you picking?

FilePicker.platform.pickFiles(
      allowedExtensions: ['csv'],
      type: FileType.custom,
      allowMultiple: false,
    );

Details to reproduce the issue

Error Log N/A

Screenshots and/or video If applicable, add screenshots or video to help explain your problem.

Flutter Version details

[✓] Flutter (Channel stable, 3.22.3, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.3 on channel stable at /Users/yuzhshen/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (6 weeks ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3

Additional context Because a file cannot be picked from "Downloads" but can be picked from "Pixel 6a" -> "Download" (this is the same folder with the same contents), I wonder if this is some permission error.

miguelpruivo commented 2 months ago

CSV is one of the non "supported" file filters. It's due to the platform.

auradigitaldev commented 2 months ago

Is there somewhere that lists the supported file filters? I thought the custom filter was intended to allow clients to specify arbitrary file extensions?