Hello everyone,
Is there a way to add/code an upload input/button, where the user can add several images, as apposed to only one?
Thank you
Tal
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
Hi guys! I just want you guys to know that https://jonatandor35.wixsite.com/test/multiupload's code worked fabulously! I really appreciated your help, J.D.. That being said, the images uploaded into the gallery only shows up when the user is uploading, which disappears if the user reloads the page :(. Any fixes to this issue?
here another option... https://andreaskviby.wixsite.com/classifieds/new-ad
I gave the multi-upload feature a try and it seems to work perfectly. But how should I modify the code for it to be able to accept multi-upload for videos instead?
this is the current set of code that enables to upload a single video file
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'd be grateful for your kind assistance.
Thanks again
Thank you!
Thank you for your thorough answer. do you have any suggestion for a middle-way solution? the users in my website that fill up a form might upload one image but also might upload 10 images. I don't want to add 10 upload button because it will be cumbersome and not UX/UI friendly for users who want to upload one image, but for others it is necessary. Thank you
Tal
Yisrael has mentioned this in a previous post about the same question...
This is currently under development.
Meanwhile, you can add multiple UploadButton components to your page and then when you click your "Save files" button, have it do startUpload() for all buttons that have a selected file.
You can also look at using media gallery fields in your dataset.
https://support.wix.com/en/article/displaying-media-uploaded-in-your-media-gallery-field-type
In the meanwhile have a read of this previous forum post here and see if this helps you.
https://www.wix.com/corvid/forum/community-discussion/uploading-multiple-images-to-a-collection-as-separate-items