React native webview unable to attach selected file

Viewed 31

I have an input file in a page (from server), displayed in react native webview by its url. Somehow, when I choose a file, after selected, it should display the name of the file in the input box (refer image) but nothing got displayed and it appeared to be empty. But, if I browse the url manually from the browser, the selected file can be displayed.

enter image description here

The above image is the one I tested from the browser. In react native app, it doesn't display anything.

HTML from server side :

<div class="form-group">
    <label>Company On Receipt</label>
    <select class="form-control select2" name="company_id" style="width: 100%;">
        <option value="ABC">ABC</option>
        <option value="DEF">DEF</option>
    </select>
    <input type="file" name="company_receipt[]" multiple="multiple" required>
</div>

React native :

...
import { WebView } from 'react-native-webview';

export default function SubmitClaim({ route, navigation }) {
    ...

    return (
        <WebView source={{ uri: 'server-side-page-url' }} />
    )
}

Dependencies :
"react-native": "0.65.1"
"react-native-webview": "^11.22.7"

For your info, this app was previously working (last tested on last year with react-native-webview: ^11.13.0). I am currently maintaining it and suddenly facing this issue so I have no idea what's going on. Tried to search similar issue but couldn't find anything that can help. I thought it could be the webview version issue so I uninstalled the existing package and re-installed but still not working.

Any help would be much appreciated. Thank you!

0 Answers
Related