Permit Feature to Preview uploadButton Content

Currently, the only way to preview the content (Image specifically) of an uploadButton is to 1) upload it 2) grab the .src from that, and pass it into an Image element.

It would be really great if we could, for example do the following:

$w("#Image1") = $w("#uploadButton1").preview()

function preview(){
  // check types match
  // check validity of uploadButton content
  // create temporary reference to image; reference disappears onPageExit
  // pass Image object/reference to lhs to be displayed
}

If you have a site where you permit the user to upload images, and then you preview those images to them, you run the risk of cluttering your Visitor Upload section in your File Content Manager.
The user might alter an image a few times, previewing each time, and then finally stick with the last one… This is bad (for the site admin, and most likely for Wix bandwidth in general), since you end up with “dead” images, which you still maintain references to.

The ideal scenario would be to allow the user to “preview” their image with this function, and then during the form submission process, actually call the .startUpload() function, to create a non-temporary reference to the image