on-internet
← Community

React Hook Form and setValue of file input

Stack Overflow ·

I'm facing issue with setting the value of file input with multiple files choice. In a form i have two file input fields, one allows user to select only one file, and the second allow multiple files. So while applying setValue to the singular file input, it works fine and file goes to state, but at the same time, while i trying to setValue for the multiple files input, i get the following error "Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string." const handleSingle = (file, uploadedData) =

Comments

Sign in or sign up to comment and upvote.

No comments yet.