react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

File Upload Documentation

Open macwilko opened this issue 7 years ago • 4 comments

Dear React-Final-Form developers,

I'm struggling to find a simple example of a file upload integration, can you help put me in the right direction?

Thank-you kindly

Matt

macwilko avatar Mar 20 '19 06:03 macwilko

have you figured this out?

I think we should just have a custom component that handles the upload and then it changes the value of a validation of some sort in the parent where the form is.

There's a duplicate issue about this here

johhansantana avatar May 07 '19 18:05 johhansantana

@johhansantana

I used react-dropzone in combination with final-form - it's working great. The uploads begin as soon as the file is dropped, and when the file upload is complete, I then allow the form to be submitted (if the other validations also pass), the form sends along the files-names that were uploaded, as part form submit.

Using the examples of #92 I was able to get something together and iterate it.

macwilko avatar May 08 '19 04:05 macwilko

@mattsrobot

Would you be able to create a quick codesandbox or something that I can view? I've been trying to follow https://github.com/final-form/react-final-form/issues/92 as well, but I can't figure it out. Been working on it for the past two days and I am not getting any close to finding a solution.

Thank you!

I'm using react-final-form and react-dropzone as well.

buhrenduh avatar May 14 '19 20:05 buhrenduh

Seconded. I just posted about this on SO, any help would be appreciated!

@mattsrobot Any chance for some code example?

intelligence avatar Aug 13 '19 19:08 intelligence