[FilePicker] Combine types and multiple in Android #69
-
Hello everyone, I saw that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
That is a restriction in Android. The plugin cannot pass mime types if multiple is set to true. You need to implement your own logic for that (e.g. show a dialog if a file with invalid mime type is selected). |
Beta Was this translation helpful? Give feedback.
-
I couldn't find any information about this restriction, so I did a test. const result = await FilePicker.pickFiles({
multiple: true,
types: [
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/pdf',
'text/plain',
'text/csv',
],
}); Am I missing something? Is that something related to the target SDK version? |
Beta Was this translation helpful? Give feedback.
That is a restriction in Android. The plugin cannot pass mime types if multiple is set to true. You need to implement your own logic for that (e.g. show a dialog if a file with invalid mime type is selected).