Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support file upload via WebView on Android #105

Merged
merged 9 commits into from
Jul 26, 2018

Conversation

peter9teufel
Copy link

The Android WebView does not support file uploads via input type file out of the box. To support file uploads on various android versions the WebviewManager has been extended with the needed file chooser options and the AcitivityResultListener Plugin is used to pass the results of the onActivityResult call to the WebviewManager.

@lejard-h
Copy link
Collaborator

Thanks,

do you know if it is builtin with iOS ?

@peter9teufel
Copy link
Author

it worked out of the box on iOS in my tests.

What may should be mentioned in the read me, is that file upload on Android requires the read storage permission to work properly

@peter9teufel
Copy link
Author

peter9teufel commented Jun 27, 2018

I am currently working on a fix as I figured out that if you switch between WebviewPlugin and native UI in the app the activity result listener that is needed for file upload callbacks can cause nullpointers.
Will report back when the issue is resolved

@peter9teufel
Copy link
Author

It was just a Nullpointer caused by interference with other tasks using onActivityResult - it should be fixed now (Y)

@lejard-h lejard-h merged commit c361dd0 into fluttercommunity:master Jul 26, 2018
charafau pushed a commit that referenced this pull request Apr 7, 2020
Support file upload via WebView on Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants