EinfachHans / capacitor-file-select

4 stars 5 forks source link

Enable to pick up a file in Android #2

Open pcsantana opened 3 years ago

pcsantana commented 3 years ago

Hi!

Why is this line commented?

https://github.com/EinfachHans/capacitor-file-select/blob/920ac40db0a1785720e2fae527d16ecfa9a0d6da/android/src/main/java/de/einfachhans/fileselect/FileSelectPlugin.java#L70

If I uncomment this line, I could select a file. Otherwise, all the files shows as disabled.

Is it a mistake, or I didn't understand how it works?

Thank you!

EinfachHans commented 3 years ago

Please create a example Repo which doesn't work for you

SergioZhydecky commented 2 years ago

I think I know what do you mean. I had issue where I can pick any file on android if some restrictions for file types are specified. Like

{
  multiple: false,
  // extensions: []  // works on android 
  extensions: ['pdf', 'png', 'jpg', 'jpeg'] // works on iOS
}

So, as you can see for android you have to remove all extension, to allow all possible files, then it works, but you will be able to select any type of file. It's also question to plugin developers, will you fix it?

EinfachHans commented 2 years ago

Feel free to create a PR guys 😃