[Seaside] Howto Image (picture) instance variable of the class

Esteban Maringolo emaringolo at gmail.com
Thu Jun 3 19:10:15 UTC 2021


Having picture1, picture2, as separate instance variables is a too
naive implementation and would hit limitations very easily.

In the next simplest implementation of this I would recommend that the
"Product" class has a "pictures" instance variable referencing an
OrderedCollection, and each element of such collection is the path to
the image file on disk.

So when you upload the file from a form you save it to a certain
location on disk and then update the product instance collection of
pictures.

Regards,

Esteban A. Maringolo

On Thu, Jun 3, 2021 at 3:52 PM Oswall Verny Arguedas C.
<sistecaq at gmail.com> wrote:
>
> Greetings,
> I have a query about saving instances of a class that are of type image (picture).
> For example. I have a Product class. This class must have two photographs of that product. I have to save two instance variables of the Product class, picture1, picture2.
> These images must be uploaded from the Product form and displayed after uploading.
> In Seaside what would be the best procedure to do it.
> I don't know if WAFileLibrary would be the best option.
> Thanks in advance.
> Oswall
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list