Skip to content

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

Closed
flutter-team-archive/plugins
#6881

Description

@yerzhansa

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

Activity

  1. added this to the milestone on Feb 14, 2019
  2. edex96 commented on Jul 23, 2019

    @edex96
  3. shirllyana93 commented on Aug 14, 2019

    @shirllyana93
  4. XuXiaowu commented on Sep 2, 2019

    @XuXiaowu

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

  5. ariG23498 commented on Sep 17, 2019

    @ariG23498
  6. ariG23498 commented on Sep 17, 2019

    @ariG23498

    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,
            ),
          ),
    
  7. jam33 commented on Sep 25, 2019

    @jam33

    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.

  8. added
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Oct 10, 2019
  9. Sarthaktydy commented on Oct 10, 2019

    @Sarthaktydy

    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.

  10. deandreamatias commented on Oct 16, 2019

    @deandreamatias

    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.

  11. kingctan commented on Dec 19, 2019

    @kingctan
  12. kingctan commented on Dec 24, 2019

    @kingctan
  13. 159 remaining items

  14. vikivyas commented on Jun 24, 2022

    @vikivyas

    Since 14 Feb 2019, this issue is the listed and none have found a good solution for new flutter developers. flutter_webview_plugin works fine yet it has android project migration pending, sometime javascript does not get loaded. webview_flutter is the best & easy to use except for this problem.

  15. mahdiqdi commented on Oct 25, 2022

    @mahdiqdi
  16. mahdiqdi commented on Nov 29, 2022

    @mahdiqdi
  17. dupuchba commented on Nov 29, 2022

    @dupuchba

    @mahdiqdi what's great about open-source is that you can contribute instead of complaining.
    Plus you can still use my old fix and take it further and adapt it to the new platform interface structure. #27924 (comment)

  18. mahdiqdi commented on Nov 29, 2022

    @mahdiqdi
  19. rashidotm commented on Dec 18, 2022

    @rashidotm

    Hi.

    I am happy to see #94051 merged which was blocking this.

    Now, is there a timeframe for when this will be closed? I am holding an update to my app based on your comments.

    thanks and best.

  20. stuartmorgan-g commented on Jan 19, 2023

    @stuartmorgan-g
    Contributor

    I filed #118836 to track the other part of addressing this that we've discussed (showing a simple example implementation in the README).

  21. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 20, 2023
  22. FirdousNath commented on Feb 24, 2023

    @FirdousNath

    Still facing the issue on 4.0.5

  23. stuartmorgan-g commented on Feb 24, 2023

    @stuartmorgan-g
    Contributor

    @FirdousNath Please file a new issue showing your onShowFileChooser handling and providing details about what isn't working.

  24. github-actions commented on Mar 10, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  25. locked as resolved and limited conversation to collaborators on Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginp: webview-keyboardKeyboard issues with flutter_webview pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyplatform-views: vdIssues specific to the Android VirtualDisplay platform views backendr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions