<div dir="ltr"><div>Hi <span style="font-family:Helvetica,Arial;font-size:13px">Karsten</span></div>""<div><span style="font-family:Helvetica,Arial;font-size:13px">the biggest challenge in serving pictures via FileLibrary is how to map a URL <-> Picture. In HTTP all you have is a URL and you need to find a way to create this URL and then also to resolve your pictures based on a given URL. So if you use a FileLibrary or a similar RequestHandler, you need a way to find your Product object and then find its picture based on a given URL. If this is simple enough in your implementation, go for it. i.e. if your Products all have an ID and your are stored in a database there’s no problem in resolving URLs like /pictures?product=1234&</span><span style="font-family:Helvetica,Arial;font-size:13px">picture=1.</span><br></div><div>""<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.63636302947998px">This first part that you tell me I think is similar to what Esteban says.<br>I have not implemented it. I am reviewing the documentation.<br></div></div></div></div></div></div></div></div></div><br></div><div>""</div><div><div style="font-family:Helvetica,Arial;font-size:13px">An alternative is to register a URL during rendering (in that case Seaside takes care of creating and resolving the URLs):</div><div style="font-family:Helvetica,Arial;font-size:13px"><span style="white-space:pre-wrap"></span>html image document: aProduct picture1 data</div><div style="font-family:Helvetica,Arial;font-size:13px">The benefit is that you don’t need to think about creating a URL and resolving it. The downside is that your images have URLs with random keys in it and they’re only valid as long as your session is alive.</div></div><div>""</div><div>Register url while rendering?.<br></div><div>There is some documentation about it.<br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue, 3 de jun. de 2021 a la(s) 23:53, Karsten Kusche (<a href="mailto:karsten@heeg.de">karsten@heeg.de</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div>
<div style="font-family:Helvetica,Arial;font-size:13px">Hi Oswall,</div>
<div style="font-family:Helvetica,Arial;font-size:13px"><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px">the biggest challenge in serving pictures via FileLibrary is how to map a URL <-> Picture. In HTTP all you have is a URL and you need to find a way to create this URL and then also to resolve your pictures
 based on a given URL. So if you use a FileLibrary or a similar RequestHandler, you need a way to find your Product object and then find its picture based on a given URL. If this is simple enough in your implementation, go for it. i.e. if your Products all
 have an ID and your are stored in a database there’s no problem in resolving URLs like /pictures?product=1234&picture=1.</div>
<div style="font-family:Helvetica,Arial;font-size:13px"><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px">An alternative is to register a URL during rendering (in that case Seaside takes care of creating and resolving the URLs):</div>
<div style="font-family:Helvetica,Arial;font-size:13px"><span style="white-space:pre-wrap"></span>html image document: aProduct picture1 data</div>
<div style="font-family:Helvetica,Arial;font-size:13px">The benefit is that you don’t need to think about creating a URL and resolving it. The downside is that your images have URLs with random keys in it and they’re only valid as long as your session is
 alive.</div>
<div style="font-family:Helvetica,Arial;font-size:13px"><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px">Kind regards</div>
<div style="font-family:Helvetica,Arial;font-size:13px">Karsten</div>
<div style="font-family:Helvetica,Arial;font-size:13px"><br>
</div>
<div>
<div>— </div>
<div><br>
<span style="white-space:pre-wrap;font-family:-apple-system;font-size:14px">Georg Heeg eK</span></div>
<div>
<div style="font-family:-apple-system;font-size:14px">
<pre style="white-space:pre-wrap">Wallstraße 22
06366 Köthen

Tel.: 03496/214328
FAX: 03496/214712
Amtsgericht Dortmund HRA 12812</pre>
<div><br>
</div>
</div>
</div>
</div>
<br>
<p>Am 3. Juni 2021 um 20:52:10, Oswall Verny Arguedas C. (<a href="mailto:sistecaq@gmail.com" target="_blank">sistecaq@gmail.com</a>) schrieb:</p>
<blockquote type="cite"><span>
<div>
<div></div>
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.6364px">
Greetings,<br>
I have a query about saving instances of a class that are of type image (picture).<br>
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.<br>
These images must be uploaded from the Product form and displayed after uploading.<br>
In Seaside what would be the best procedure to do it.<br>
I don't know if WAFileLibrary would be the best option.<br>
</div>
<div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.6364px">
Thanks in advance.<br>
</div>
<div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.6364px">
Oswall</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div>
</div>
</span></blockquote>
</div>

</blockquote></div>