Upload a file to S3 from velo button in WIX and return a different file

Hi! I am trying to upload a file from Wix to an S3 bucket. I have copied this code which I am aware does not connect to S3


export function button1_click(event) {
  if($w("#uploadButton1").value.length > 0) {
    $w("#text1").text = "Uploading " + $w("#uploadButton1").value[0].name;
    $w("#uploadButton1").startUpload()
      .then( (uploadedFile) => {
        $w("#text1").text = "Upload successful";
        $w("#image1").src = uploadedFile.url;
      })
      .catch( (uploadError) => {
        $w("#text1").text = "File upload error";
        console.log("File upload error: " + uploadError.errorCode);
        console.log(uploadError.errorDescription);
      });
  } 
  else {
    $w("#text1").text = "Please choose a file to upload.";
  }
}

My upload triggers a lambda to process the file and I want to return a separate file from a different bucket (most recent created date).

I have the upload currently working (not download) from html…but wanted to see if I could do this more seamless with Velo integration.

All advice appreciated!
Meg

Did you ever figure this out? I am looking for something similar.

Why not just using — > Wix-Secret ???