This work for me - ref={ref => this.fileInput = ref}, then in my case once the file was uploaded to the server , I clear it by using the statement below. Which to use? How can I clear an HTML file input with JavaScript? React offers 2 approaches to access the value of an input field: using a controlled or uncontrolled component techniques. Connect and share knowledge within a single location that is structured and easy to search.