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

Oswall Verny Arguedas C. sistecaq at gmail.com
Wed Jun 9 19:40:54 UTC 2021


I understand,  I have to create a collection of internal addresses of the
images and they are saved in the system (folder).
After saving it, it must be presented on the screen.
The library to implement that is FileLibrary or there is another.
Thanks.




El jue, 3 de jun. de 2021 a la(s) 13:10, Esteban Maringolo (
emaringolo at gmail.com) escribió:

> 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
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20210609/7cd5a008/attachment.html>


More information about the seaside mailing list