I can upload multiple photos at once but can't save them to database.
i watched
https://www.youtube.com/watch?v=XbzyI8KLVRg&t=400s
but there is no save
Hello Duc,
Are you getting any error while trying to save? Also, please refer the below post and see if you get any help it.
https://www.outsystems.com/forums/discussion/71159/reactive-multiple-file-upload-how-to-save-multiple-upload-images-show-images/
Thanks,
Sachin
I don't know how to save multiple photos in one product
. I'm newbie
Hello Duc Dong
Create an entity in your database to store the photos. The entity should have a binary data type attribute to store the photo data and any other relevant attributes like the file name, description, etc.
Create a screen in OutSystems with a file upload widget. You can use the "Multiple" property of the file upload widget to allow users to select and upload multiple photos at once.
Create a server action to handle the file upload. The server action should have input parameters to receive the uploaded files and any other relevant data like the file names and descriptions.
Inside the server action, use the "CreateOrUpdate" action from the database extension to create a new record for each uploaded file. Set the binary data attribute to the contents of the uploaded file, and set any other relevant attributes based on the input parameters.
After creating the records in the database, you can return any relevant data to the screen or perform any additional actions as needed
Hi Duc,You can use for each over FilesList for saving multiple file images in DB for a particular product as shown in below image.
Oml is also attached for better understandingHope it will help.Let me know if it works.
RegardsKrishnanand Pathak
Hello.
You are appending to FilesList, but not sending to database. To save them for good, they need to be on DB, not on a local variable that will be discarded.