Flutter_file_picker: Multiple file extensions when using getMultiFilePath()

Created on 10 Apr 2019  路  6Comments  路  Source: miguelpruivo/flutter_file_picker

Hey, I've seen 2 issues before me, #42 and #32 .
The questions are both closed but I can't seem to find a mention of this feature being added in the changelog.

For clarification, I'm looking to pick multiple files of a pre-defined extension (for example .jpg and .mp4).

Maybe I have missed it somewhere, if so, apologies.

suggestion

Most helpful comment

@whigger85 thank you for the input, it surely will be added in a future update if possible.

All 6 comments

Hi. If you want to pick images or videos you can use FileType.IMAGE or FileType.VIDEO respectively. However, picking both images (jpg) and video (mp4) at the same time isn鈥檛 currently supported, for that I suggest you to use FileType.ALL that lets you pick anything and then you can quickly check if any of the picked files are not jpg/mp4.

Thank you for the suggestion.

Thank you for the clarification, I will follow your advice and use FileType.ALL for the time being, I hope to see multiple file extensions implemented in the future. If I may, I would like to suggest the solution discussed in #32 or a delimiter such as 'jpg|mp4' so it doesn't break existing code.

Thank you for the great work.

I will take this in consideration if possible for both platforms.

As a note, I always try to avoid making a feature only available to a specific platform to make the experience as seamlessly as possible. Android, in general, is more flexible and supports more options that iOS, however, it is also more tricky to handle for the available scenarios.

So if sometimes I don't add a requested feature, may be because it isn't supported by one platform even if it's supported by the other.

Moved to #99.

It would be great to define multiple file extensions in combination with the "FileType.CUSTOM" parameter when selecting a single file. Of course you can check the selected file type afterwards, but it would be a better user experience if the user wouldn't even be able to select an unsupported file type in the first place.

@whigger85 thank you for the input, it surely will be added in a future update if possible.

Was this page helpful?
0 / 5 - 0 ratings