question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not use input type = “file” in webview. (Android)

See original GitHub issue

Can not use input type = “file” in webview. (Android) The upload button does not respond.

Is there a solution?

Packages: expo: 30.0.0 react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz

Steps to Reproduce

import React, { Component } from 'react';
import { WebView } from 'react-native';

export default class App extends Component {
  get html() {
  return '<!DOCTYPE html>\
    <html lang="en">\
    <head>\
      <meta charset="UTF-8">\
      <meta name="viewport" content="width=device-width, initial-scale=1.0">\
      <meta http-equiv="X-UA-Compatible" content="ie=edge">\
      <title>Document</title>\
    </head>\
    <body>\
      <input type="file"/>\
    </body>\
    </html>'
  }
  
  render() {
    return (
      <WebView style={{margin: 40}} source={{html: this.html}}/>
    );
  }
}

Reproducible Demo Snack: https://snack.expo.io/BJSrAK2yM

Expected Behavior Image upload in webview.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
dhiraj1sitecommented, Jan 23, 2019

Hi @esamelson , the issue is said to be resolved in RN thread , but does not work in latest version of expo any plans for fixes ?

2reactions
dhiraj1sitecommented, Jan 17, 2019

Any updates on this ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML input type 'file' is not working on webview in android. Is ...
This is my android code which load html file for browse file and upload on server. runOnUiThread(new Runnable() { @Override public void run()...
Read more >
troubleshooting-input-type-file-not-working-in-android - GitHub
Using <input type="file"> doesn't work on some Android devices. In most of the cases, when the Choose File button is tapped there is...
Read more >
WebView File Upload Button Not Working Android Studio 2020
fix input field dont work in webview and input type file not working in webview .
Read more >
HTML input type 'file' is not working on webview in ... - YouTube
HTML : HTML input type ' file ' is not working on webview in android. Is there any way to upload file. 317...
Read more >
html file input does not work in android WebView - CodeRanch
Everything in my android web app is working as expected except the html file input fields coded as in webpage.When i click on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found