flutter icon indicating copy to clipboard operation
flutter copied to clipboard

[webview_flutter] not working choose file (input type file)

Open yerzhansa opened this issue 7 years ago • 162 comments

Steps to Reproduce

  1. Run simple index.html with tag <input type="file"> in webview_flutter
  2. Try to click to input (choose file) and nothing happens

yerzhansa avatar Feb 14 '19 07:02 yerzhansa

I have this issue too. Does anybody have found a solution yet?

edex96 avatar Jul 23 '19 14:07 edex96

I having similiar issues too. I can not select the add media button in my webview and also the choose select button also not function.. other thing are fine..😢

shirllyana93 avatar Aug 14 '19 11:08 shirllyana93

I have this issue too on Android. but run on iOS fine.

XuXiaowu avatar Sep 02 '19 09:09 XuXiaowu

The input option does not work with the plugin for me too. :cry:

ariG23498 avatar Sep 17 '19 14:09 ariG23498

Hey, I have a workaround for this. This will take another plugin though. :smile: The plugin: https://github.com/fluttercommunity/flutter_webview_plugin The code:

        child: WebviewScaffold(
          url: _url,
          withLocalStorage: true,
        ),
      ),

ariG23498 avatar Sep 17 '19 15:09 ariG23498

this is an issue with native android webviews. it is not directly related to flutter (a bug within flutter), although fixing it would require the flutter team to write some code to implement the feature as the webview_flutter plugin acts as a passthrough to the native webviews.

you can see a discussion around the android native problem at: url

agreed that this does not affect iOS as the native iOS implementation does not suffer from the same limitation as the android implementation.

i would love to see this get fixed as I spent a ton of time implementing something on a webpage with javascript that you can't do easily in flutter only to have it not work due to the inability to upload files. i guess i could technically put a flutter widget above the webview to do the upload and then have the webview take over, but that would create a pretty tricky/possibly ugly experience.

jam33 avatar Sep 25 '19 15:09 jam33

Hey, I have a workaround for this. This will take another plugin though. 😄 The plugin: https://github.com/fluttercommunity/flutter_webview_plugin The code:

        child: WebviewScaffold(
          url: _url,
          withLocalStorage: true,
        ),
      ),

This plugin doesn't allow you to draw widget on top of webview you need to close the webview to show popup and everything. Also, the "input" tag works fine without "withlocalstorage:true" "withlocalstorage" is used to render HTML/js from the local storage.

Sarthaktydy avatar Oct 10 '19 12:10 Sarthaktydy

this is an issue with native android webviews. it is not directly related to flutter (a bug within flutter), although fixing it would require the flutter team to write some code to implement the feature as the webview_flutter plugin acts as a passthrough to the native webviews.

you can see a discussion around the android native problem at: https://stackoverflow.com/questions/5907369/file-upload-in-webview

agreed that this does not affect iOS as the native iOS implementation does not suffer from the same limitation as the android implementation.

i would love to see this get fixed as I spent a ton of time implementing something on a webpage with javascript that you can't do easily in flutter only to have it not work due to the inability to upload files. i guess i could technically put a flutter widget above the webview to do the upload and then have the webview take over, but that would create a pretty tricky/possibly ugly experience.

Hi, You have a small problem in your link. It is not formatted with the correct link.

About the problem, this happens only on Android. If someone wants to try to implement the solution, you can fork the plugin here.

deandreamatias avatar Oct 16 '19 15:10 deandreamatias

any update for this bug?

kingctan avatar Dec 19 '19 03:12 kingctan

I have fixed this bug and testing. maybe i can make a PR.

kingctan avatar Dec 24 '19 03:12 kingctan

Any update?

Sarthaktydy avatar Jan 03 '20 10:01 Sarthaktydy

Maybe this plugin help to solve the problem https://github.com/Sh1d0w/multi_image_picker

deandreamatias avatar Jan 09 '20 11:01 deandreamatias

Maybe this plugin help to solve the problem https://github.com/Sh1d0w/multi_image_picker

I don't think this will be helpfull inside the webview.

Sarthaktydy avatar Jan 10 '20 09:01 Sarthaktydy

Help please .. same too

adsants avatar Jan 28 '20 07:01 adsants

Please stop commenting on problems

any update on this / help please

The best option is to add this emoji :+1: in the initial comment. To see a priority of each problem, we can see in which Milestone the isse is added. This issue belongs to milestone Goals, with this description:

P2: These are tasks we think are worth fixing in the coming years. It includes issues we've identified that might block fully shipping broad consumer-facing apps, correctness issues, and bugs relating to polish and quality. The date on this milestone is utterly arbitrary and just intended to sort the milestone appropriately.

deandreamatias avatar Jan 28 '20 07:01 deandreamatias

Same Problem, Wondering When we can find a solution.

Smartauto avatar Feb 26 '20 14:02 Smartauto

wating for fixing this problem,I met this problem for many days but have no idea to resolve

leolei032 avatar Mar 13 '20 13:03 leolei032

Same problem

gianlucainnocente avatar Mar 20 '20 17:03 gianlucainnocente

will they fix this issue soon?

melWiss avatar Mar 20 '20 20:03 melWiss

use this flutter_webview_plugin its work for me .. can for input type file

adsants avatar Mar 21 '20 06:03 adsants

Steps to Reproduce

  1. Run simple index.html with tag <input type="file"> in webview_flutter
  2. Try to click to input (choose file) and nothing happens

huiying7 avatar Mar 22 '20 14:03 huiying7

This issue is only in Android devices

deandreamatias avatar Mar 22 '20 17:03 deandreamatias

same problem any updates? I can't upload file in webview page

KareemAbdella avatar May 05 '20 00:05 KareemAbdella

Same problem. Is there any update?

DesmondX avatar May 20 '20 08:05 DesmondX

I solve the problem by hide() or show() webView when I push page or back page

huiying7 avatar May 20 '20 08:05 huiying7

Same problem. Is there any update?

Same problem. Is there any update?

I solve the problem by hide() or show() webView when I push page or back page

huiying7 avatar May 20 '20 08:05 huiying7

Same problem. Is there any update?

Same problem. Is there any update?

I solve the problem by hide() or show() webView when I push page or back page

how?

DesmondX avatar May 20 '20 10:05 DesmondX

same problem

wangmarkqi avatar May 28 '20 04:05 wangmarkqi

I have solved this problem. https://github.com/libo1223/plugins/tree/master/packages/webview_flutter If it is useful, please star

afei1223 avatar Jun 05 '20 08:06 afei1223

@libo1223 Please check "git status", you have some missing files there... :)

kustraslawomir avatar Jun 05 '20 10:06 kustraslawomir