0

I am trying to upload the two fields plus a file from react to backend express. But I don't know why if I put the value={statement} into the form, when I selected the file, after clicked "open" the file, nothing shows in the browser, but after I removed the value={statement}, "open" the file and the filename is showed. The thing is how can I reference value after submitting the form?? If I removed the value, there is a network error showing 400.

<div className="control">
            <input
            type="file"
            className="input"
            value={statement}
            onChange={changeHandler}
            placeholder="Bank Name"
        /> 

Thanks, Jo

1 Answer 1

1

It ends up that I placed the placeholder there when the input type ='file'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.