[Seaside] Using image tags in Seaside

Avi Bryant avi at beta4.com
Thu Sep 9 11:23:37 CEST 2004


On Sep 9, 2004, at 11:10 AM, Andreas Nilsson wrote:

> 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?

As long as it's wrapped correctly.  #imageWithForm: expects an object 
that responds to the following messages:

- #width (the width of the image in pixels)
- #height (the height of the image in pixels)
- #asMIMEDocument (a MIMEDocument instance containing the appropriate 
raw data and mime type)
- #= (compare to another object; should return true if that object 
contains the identical image data, so you might use a primary key from 
your database or some such)
- #hash (a hash method to match #=)



More information about the Seaside mailing list