You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/22 11:55:31 UTC

[GitHub] [cordova-android] MatusFiala commented on issue #695: Missing Intent type and category prevent file upload - [solution included]

MatusFiala commented on issue #695: Missing Intent type and category prevent file upload - [solution included]
URL: https://github.com/apache/cordova-android/issues/695#issuecomment-475593182
 
 
   @gabriele-sacchi thank you, but your code will have some problems. Your params should be set in the calling webapp and not in SystemWebChromeClient. Especially "intent.setType("*/*")" will create an intent for all types. So if you just want a filepicker for pictures, you would get a picker where you could select all types like videos, pdfs, etc. 
   So either the calling app has to fix it, to only load the given file-type, or the user may have a really bad user-experience.
   
   Normally these params are written in the "WebChromeClient.FileChooserParams" of onShowFileChooser(). So you're at the rigth method. You just have to read out the WebChromeClient.FileChooserParams-Object and pass the params to the intent.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org