FirefoxReality icon indicating copy to clipboard operation
FirefoxReality copied to clipboard

File upload support

Open larsbergstrom opened this issue 6 years ago • 6 comments

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.

larsbergstrom avatar Aug 01 '18 13:08 larsbergstrom

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.

bluemarvin avatar Aug 01 '18 18:08 bluemarvin

This comment details what FxR needs to do to support a file picker:

https://bugzilla.mozilla.org/show_bug.cgi?id=1476810#c1

bluemarvin avatar Aug 02 '18 23:08 bluemarvin

can we make this a P0 for v1.1?

cvan avatar Sep 19 '18 00:09 cvan

Moving to backlog until we get android component support https://github.com/mozilla-mobile/android-components/issues/1076

larsbergstrom avatar Nov 02 '18 21:11 larsbergstrom

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);

philip-lamb avatar Mar 07 '19 08:03 philip-lamb

Any news on this?

revanmj avatar Apr 10 '21 16:04 revanmj