Upload images on submit.

Hello, I've been looking for an answer for a while now. Is it possible, if yes - how do I call the <UploadDropzone /> upload button function when pressed on a custom button in a page?
1 Reply
Molekulė
MolekulėOP12mo ago
Detailed explanation: User uploads images to the web, but they're not sent to the cloud until the submit function is called.
<UploadDropzone
className={`border-placeholder text-highlight`}
endpoint="imageUploader"
onClientUploadComplete={(res: any) => {
if (res) {
setImages(res);
}
}}
onUploadError={(error: Error) => {
console.log(`ERROR! ${error.message}`);
}}
/>
<UploadDropzone
className={`border-placeholder text-highlight`}
endpoint="imageUploader"
onClientUploadComplete={(res: any) => {
if (res) {
setImages(res);
}
}}
onUploadError={(error: Error) => {
console.log(`ERROR! ${error.message}`);
}}
/>
Want results from more Discord servers?
Add your server