Re: [Zope] Sendmail tag and images
From the source, it looks like you can get at the raw image info by referring to "Myimage.data". But, I can't guarantee that you won't need more encoding to send it via email.
(The manage_FTPget method does nothing but return "self.data") Kevin -----Original Message----- From: Jason Spisak <webmaster@mtear.com> To: zope@zope.org <zope@zope.org> Date: Thursday, August 19, 1999 9:00 PM Subject: [Zope] Sendmail tag and images
I am using the sendmail and mime tages to send an image with a few files. But in Zope2, images render to a url. For example, <!--#var Myimage--> renders "http://nyhost:8080/images/Myimage" When trying to send this via email, all that goes is the url, naturally. I tried <!--#var "_[Myimage]"-->, and I get a __hash__ error. I tried it with quotes, but that's looing for an object in the namespace and I get a KeyError. How do I et those raw bytes.
Kevin, Thanks for the heads up! <!--#var "Myimage.data"--> rendered perfectly as an attatchment. Now if I can get the <!--#boundary --> tag to let me put an <!--#if--> in front of it I'll be fine. I get an "unxpected tag" error, even with all the proper closing <!--/#if-->'s. Wierd. Thanks again, Jason Kevin Dangoor wrote:
From the source, it looks like you can get at the raw image info by referring to "Myimage.data". But, I can't guarantee that you won't need more encoding to send it via email.
(The manage_FTPget method does nothing but return "self.data")
Kevin
-----Original Message----- From: Jason Spisak <webmaster@mtear.com> To: zope@zope.org <zope@zope.org> Date: Thursday, August 19, 1999 9:00 PM Subject: [Zope] Sendmail tag and images
I am using the sendmail and mime tages to send an image with a few files. But in Zope2, images render to a url. For example, <!--#var Myimage--> renders "http://nyhost:8080/images/Myimage" When trying to send this via email, all that goes is the url, naturally. I tried <!--#var "_[Myimage]"-->, and I get a __hash__ error. I tried it with quotes, but that's looing for an object in the namespace and I get a KeyError. How do I et those raw bytes.
Kevin Dangoor wrote:
From the source, it looks like you can get at the raw image info by referring to "Myimage.data". But, I can't guarantee that you won't need more encoding to send it via email.
You are correct about FileObject.data (Images are just a special kind of file object). The <dtml-mime> tag will encode the binary information properly. -Michel
(The manage_FTPget method does nothing but return "self.data")
Kevin
-----Original Message----- From: Jason Spisak <webmaster@mtear.com> To: zope@zope.org <zope@zope.org> Date: Thursday, August 19, 1999 9:00 PM Subject: [Zope] Sendmail tag and images
I am using the sendmail and mime tages to send an image with a few files. But in Zope2, images render to a url. For example, <!--#var Myimage--> renders "http://nyhost:8080/images/Myimage" When trying to send this via email, all that goes is the url, naturally. I tried <!--#var "_[Myimage]"-->, and I get a __hash__ error. I tried it with quotes, but that's looing for an object in the namespace and I get a KeyError. How do I et those raw bytes.
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Jason Spisak -
Kevin Dangoor -
Michel Pelletier