[Seaside] Using image tags in Seaside

Andreas Nilsson wahboh at mac.com
Thu Sep 9 11:10:23 CEST 2004


As my images belongs to a busniess object, they are stored in the 
database along with the data.
I was planning on saving them to temporary files when requested, but 
your second example sounds even better.
What i'm saving in the database is basically 'file contents' from the 
image file, can i send that data directly to #imageWithForm?

/Adde

On 2004-09-09, at 10.42, Avi Bryant wrote:

>
> On Sep 8, 2004, at 5:56 PM, Andreas Nilsson wrote:
>
>> I'm trying to get seaside to show images on a page, but I don't 
>> understand where to put the files.
>> Found a FAQ on the web that said something about DocumentRoot in the 
>> application config, but I can't find any setting named DocumentRoot.
>
> Wow.  That FAQ is ancient - in fact, most of the content on that wiki 
> is (note that I don't, AFAIK, link to it from anywhere anymore).
>
> Anyway, there are basically two options:
>
> - have the images hosted externally to Seaside, and use image tags 
> with external URLs:
> 	html image: 'http://imagehost.com/myimage.jpg' altText: 'My Image'
>
> - suck the image data into your (Squeak) image, and serve it directly 
> from Seaside:
> 	html imageWithForm: (MyImages at: #someImage)
>
> I prefer the second, from a deployment point of view, because you end 
> up with just one .image file to copy around.  It's also great for 
> dynamically generated images (use PlotMorph to generate live charts, 
> for example).  But having something like apache serving static images 
> can be a performance win.
>
> Avi
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>



More information about the Seaside mailing list