Search code examples
filereactjsreduxredux-form

error with redux form using fileInput


form for making for forms and it works very well but when i have a file input it adds a value prop to the file input and it causes this error on the dom

Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.(…)

is there a way for me to prevent the redux-form from adding the value prop to the file input?


Solution

  • redux-form doesn't particularly play well with file upload inputs. I recommend using react-dropzone for that and keeping it separate from your redux-form form.