Hey, really happy to hear that this helped you! This gets a little more complex and I'll definitely expand on this specific question with react-hook-form when I get a little more time.
Until then, these resources may help:
You will most likely have to use FormData() to handling attaching a file on the frontend.
Didn't test these comments but this stackoverflow article about FormData & react looks promising on how to do it with a handleChange or handleSubmit function.
On the backend, you will will have to at least use a library like multer to handle those file requests.
I know Vue is very different but I have a Vue.js frontend project where I sent a picture file with FormData(): github.com/jlong4223/the-office-cl...
Hey, really happy to hear that this helped you! This gets a little more complex and I'll definitely expand on this specific question with
react-hook-form
when I get a little more time.Until then, these resources may help:
You will most likely have to use FormData() to handling attaching a file on the frontend.
Didn't test these comments but this stackoverflow article about FormData & react looks promising on how to do it with a
handleChange
orhandleSubmit
function.On the backend, you will will have to at least use a library like
multer
to handle those file requests.I know Vue is very different but I have a
Vue.js
frontend project where I sent a picture file withFormData()
:github.com/jlong4223/the-office-cl...
This is another API of mine where I use
multer
to handle file requests. In this case, pictures:github.com/jlong4223/node-cloudina...
I will get back to this, but until this hopefully these help a little š