Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Add API for file uploads #1076

Closed
pocmo opened this issue Oct 17, 2018 · 1 comment
Closed

Add API for file uploads #1076

pocmo opened this issue Oct 17, 2018 · 1 comment
Labels
<engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) 🌟 feature New functionality and improvements 🎭 Focus Requirements for Focus/Klar 🚀 Rocket Requirements for Firefox Rocket

Comments

@pocmo
Copy link
Contributor

pocmo commented Oct 17, 2018

For file uploads we get a callback from the engine to show a file chooser. This may require a system permission to read the external storage. I was wondering if we could handle this internally in the engine. However at least for the permission request and the intent result from the picker we'd need some help from the app, I guess.

For GeckoView take a look at Focus and GeckoViewPrompt.onFilePrompt:
https://github.com/mozilla-mobile/focus-android/blob/master/app/src/main/java/org/mozilla/focus/gecko/GeckoViewPrompt.java#L716

And GeckoViewPrompt.onFileCallbackResult():
https://github.com/mozilla-mobile/focus-android/blob/master/app/src/main/java/org/mozilla/focus/gecko/GeckoViewPrompt.java#L770

The WebView APIs:
https://developer.android.com/reference/android/webkit/WebChromeClient#onShowFileChooser(android.webkit.WebView,%20android.webkit.ValueCallback%3Candroid.net.Uri[]%3E,%20android.webkit.WebChromeClient.FileChooserParams)

Both APIs require a callback. I'm not sure how we want to expose that. We do not really want to stuff a callback into Session.

┆Issue is synchronized with this Jira Task

@pocmo pocmo added 🌟 feature New functionality and improvements <engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) 🎭 Focus Requirements for Focus/Klar 🚀 Rocket Requirements for Firefox Rocket labels Oct 17, 2018
@NotWoods
Copy link
Contributor

Closing this since its been added to PromptFeature a while back

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
<engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) 🌟 feature New functionality and improvements 🎭 Focus Requirements for Focus/Klar 🚀 Rocket Requirements for Firefox Rocket
Projects
None yet
Development

No branches or pull requests

2 participants