Code for Extra Upload Button

Hi.
I need some help in a code/script to use an extra Upload Button.
Anybody here who has successfully used a set of workable code, please let me know.

I have a page with a button to upload a video file, and would like to have it upload another video file.

Thank you.

Hi.

You can refer to this forum post for the solution: Upload Multiple files using single upload button

Good luck!

thanks. but is there any way that this set of code (appended below) be modified for my needs?
I’m trying to minimise to re-code what I already have which works for 1 file upload.


export function button2_click(event) {
if ($w(“#uploadButton1”).value.length > 0) {
$w(“#text24”).text = Uploading ${$w("#uploadButton1").value[0].name};
$w(“#uploadButton1”).startUpload()
.then((uploadedFile) => {
$w(“#text24”).text = “Upload successful”;
})

.catch((uploadError) => {
$w(“#text24”).text = “File upload error”;
console.log(Error: ${uploadError.errorCode});
console.log(uploadError.errorDescription);
});
}
else {
$w(“#text24”).text = “Please choose a file to upload.”;
}
}

@cheryl Uploads of multiple files is not currently supported. You will need to use other techniques such as Sam suggested.