How to attach a file to file input using JavaScript in react native web view

I am building an application using react native which auto completes various Form Fields on third party websites by injecting a JavaScript Script send from the server for signed in user using injectedJavaScript method in react-native-webview package (https://github.com/react-native-webview/react-native-webview). I works for all the fields accept file fields. is there any way to do it. if not is there any other approach to auto complete file form fields on third party website. or any modifications we can make in react native webview to not block the requests to attach files

I have tried using injectedJavaScript method but it doesn’t work. I know due to browser security policies it is blocked. but we are using web view it there way to modify it