Wish Webview file upload / file chooser

Siam

Active Member
Licensed User
Longtime User
Hello,

since 2 years it is not possible to upload Files with a Webview:oops::( the FileChooser will not be opened if you press a upload button.

If someone can write a wrapper to bring back this function PLEASE do it! because my Java knowledge is very bad so i can't do it :oops:

If somenone write this wrapper I will spend a box of beer (ok the money) and i think i'am not the Only who will pay for this work.

with kind regards

Andy

public boolean onShowFileChooser (WebView webView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams)
Added in API level 21
Tell the client to show a file chooser. This is called to handle HTML forms with 'file' input type, in response to the user pressing the "Select File" button. To cancel the request, call filePathCallback.onReceiveValue(null) and return true.

Parameters
webView The WebView instance that is initiating the request.
filePathCallback Invoke this callback to supply the list of paths to files to upload, or NULL to cancel. Must only be called if the showFileChooser implementations returns true.
fileChooserParams Describes the mode of file chooser to be opened, and options to be used with it.
Returns
  • true if filePathCallback will be invoked, false to use default handling.
Quelle:
https://developer.android.com/refer...oid.webkit.WebChromeClient.FileChooserParams)
 

peacemaker

Expert
Licensed User
Longtime User
Also need it. Donation is possible for help.
 
Top