232
Views
5
Comments
Save Upload multi Image
Application Type
Reactive
Platform Version
11.19.0 (Build 38072)

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

GreenStore.oap
2020-09-21 11-35-56
Sachin Waghmare

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

UserImage.jpg
Duc Dong

I don't know how to save multiple photos in one product 

. I'm newbie

2022-02-25 19-42-59
Srinivas K Singadi

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

2023-04-16 15-25-31
Krishnanand Pathak

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 understanding
Hope it will help.
Let me know if it works.


Regards
Krishnanand Pathak

Updated_GreenStore.oml
2016-04-22 00-29-45
Nuno Reis
 
MVP

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.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.