I just wanted to share this recent update to the upload field button used to upload multiple files at the same to post them in a database, until the Corvid team bring a real upload field for more than 1 item.
// gallery upload
export async function repeaterUploadBtn_change(event) {
let imageToGallery = {};
let file = $w('#galleryUploadBtn').value;
if(file.length > 0){
const response = await $w('#galleryUploadBtn').startUpload($w('#galleryUploadBtn').buttonLabel = 'Uploading ...');
if(response){
$w('#galleryUploadBtn').buttonLabel = 'Add picture';
imageToGallery.src = response.url;
imageToGallery.type = 'image';
console.log('gallery', galleryPictures);
galleryPictures.push(imageToGallery);
imageToGallery = {};
}
}
galleryDisplayer();
}
function galleryDisplayer(){
$w('#innGallery').items = galleryPictures;
$w('#innGallery').expand();
}
" https://www.wix.com/corvid/profile/archsmady "
Hello Dev thanks for your consideration.
I am new in Wix and i really want to know how to upload multi images and files to my database and i saw your posts, i really want to know where to put this code and how ,can you please help me. i wish you upload a video showing exactly how to accomplish this.
Thanks,
best regards