I want to make a social media website and my question is: Is it possible for my users to upload images , videos and a text simultaneously and preview their uploads before publishing them? I was thinking about like a collage to preview everything.
You can add and image and video element an then have it so that once the file is uploaded the source of the elements you added are changed and then shown.
Code would look something like this.
export function uploadButton1_change ( event ) {
if ( $w ( “#uploadButton1” ). value . length > 0 ) {
$w ( “#uploadButton1” ). startUpload ()
. then ( ( uploadedFile ) => {
$w ( “#image1” ). expand ()
$w ( “#image1” ). src = uploadedFile . url ;
})
}
}