Is there a way to upload file and saving it to database without having to submit the form?

Currently I am trying to upload files from a modal. The files has to be saved permanently after they are selected and without needing to submit the form, as the form has only the field.
5 Replies
toeknee
toeknee8mo ago
You could do it with afterStateUpdated and manually handle the upload. But it's not really advised.
Sebastian
Sebastian8mo ago
Did you find a solution? Having the same requirement...
Thou Blue
Thou BlueOP8mo ago
I tried using afterStateUpdated, but with multiple files, there was some issue so had to search another way to do so. What happened was, when I uploaded 3 files, 6 files were saved in db. Still working around it.
toeknee
toeknee8mo ago
Did you wait for all to be finished uploading before clicking save?
Thou Blue
Thou BlueOP8mo ago
Yes, That's what I did.
Want results from more Discord servers?
Add your server