@henningholm90
Found your code pretty interesting. But I do not know where in my set of current code should i insert this set. I need one more button to be able to upload a 2nd video. below is the current set of code for 1 video 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.”;
}
}
I tried to overlay the 2nd uploadButton on top of the first, but I could not figure out if the code worked to expand the 2nd button after the first file was selected.
I’d be grateful if you could share your knowledge on this.