[Seaside] How-to upload and view image ?
Hilaire Fernandes
hilaire at ext.cri74.org
Sun Sep 19 10:42:14 CEST 2004
Hello Mang,
Thanks for your tips.
Yesterday I have explored Andreas way of doing the stuff, and I found
that while doing a little bit differently, it was possible to avoid most
of the crap to dermine mime type and image size:
1. instead of encapsulating WAFile::content, encapsulate WAFile itself,
you get the mime type for free from the contentType method, so
AsMIMEDocument just need to be a wraper to it
2. Returning a non numeric from heigh and width, will just let the
browser guess the default size of the image. I return an empty string '', in this case
the html rendered code looks like:
<img width="" height="" border="0" alt="" src="/seaside/test?_s=igNqaPJRJWPBTrOD" />
Hilaire
More information about the Seaside
mailing list