Is it possible to allow end user to upload multiple images tied to a single ID?

Hi,

I am creating a traditional web where users can upload multiple pictures of a product. How do I go about doing this? I am able to upload a single image per product using the following tutorial: https://www.outsystems.com/forums/discussion/36927/how-to-upload-an-image-with-outsystems-beginner/

But how do I go about uploading multiple images of one product?

Thanks

Hi! 

In the example João Vicente show the image as an extension to the "main" entity, but  it is not mandatory. 

You can have something like 

Hope this help

Graça

Hi,

If all images uploaded from the product have the same ProductId, you have no problem doing what you want.

Hi Jonathan,


In terms of Database, you did a one-to-one relationship when uploading a single picture for each product.

Now you want to achieve a one-to-Many relationship. Meaning that one product will have as many pictures as you want. In the Database you need to replicate something like this:


To have a foreign key in the entity that holds the pictures, in a new attribute and not in the Id as in the one that you already did.

Then you just need to guarantee that you are assigning the correct Productid when saving a picture.


Best regards,

João Delgado





João Delgado wrote:

Hi Jonathan,


In terms of Database, you did a one-to-one relationship when uploading a single picture for each product.

Now you want to achieve a one-to-Many relationship. Meaning that one product will have as many pictures as you want. In the Database you need to replicate something like this:


To have a foreign key in the entity that holds the pictures, in a new attribute and not in the Id as in the one that you already did.

Then you just need to guarantee that you are assigning the correct Productid when saving a picture.


Best regards,

João Delgado





Hi,

Thanks for replying. I understand the database part of the solution, but how am I able to implement this on the form side? Currently I am only able to upload one image tied to one id within the same page. Is it possible to upload 3 images within the same page without the use of external widgets?


Thanks.


One by one or 3 at the same time?

Maria da Graça Peixoto wrote:

One by one or 3 at the same time?

Hi,

3 at the same time if possible. Can this be done? I am having trouble completing this task.

Thanks.

Hi!

You have in the FORGE several options but Multiple File Upload seams nice.

Regards