FirefoxReality
FirefoxReality copied to clipboard
File upload support
Depends on: https://bugzilla.mozilla.org/show_bug.cgi?id=1476810
Ideally, in order to support both screenshot upload in the bug reporting form and general upload of files from the device to web sites, we'd like to support <input type="file">
. Before we do anything, though, it's my understanding that we'd need the support from Gecko, in the link above.
GeckoView already has the prompt API in place. It's our responsibility to implement the UI for the prompt. It might need to be platform dependent as I'm not certain what each platform allows us to peruse for selecting items to upload.
This comment details what FxR needs to do to support a file picker:
https://bugzilla.mozilla.org/show_bug.cgi?id=1476810#c1
can we make this a P0 for v1.1?
Moving to backlog until we get android component support https://github.com/mozilla-mobile/android-components/issues/1076
We could implement this ourselves without too much drama. We have to implement interface https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoSession.PromptDelegate.html#onFilePrompt-org.mozilla.geckoview.GeckoSession-java.lang.String-int-java.lang.String:A-org.mozilla.geckoview.GeckoSession.PromptDelegate.FileCallback- plus a file picker which allows browsing. Default top-level directory would be that returned by Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_DOWNLOADS);
Any news on this?