On 6/28/06, Kate Legere <[EMAIL PROTECTED]> wrote:
I'm writing a form which allows the user to send an image attachment with
their email...

<form method=post action="sendPic" ENCTYPE="multipart/form-data">
<p>Attach: <input type="file" name="pic.jpg"></p>

<p>Send to:</p>
   <input type="checkbox" name="send_to:list" value="[EMAIL PROTECTED]">
  My email
<input type=submit value="Send Picture">

------ it's handled with sendPic -----------

<dtml-sendmail smtphost="mail.host.ca">
To: art critic
From: patron
Subject: Art

Hi, please take a look at my art and post it if you think it's good enough.

<dtml-mime type=image/jpeg encode=base64 name=resume><dtml-var pic.jpg >


<p>Your image was sent.</p>

--------- but it only delivers -------

Hi, please take a look at my art and post it if you think it's good enough.

Mime-Version: 1.0
Content-Type: multipart/mixed;

Content-Type: image/jpeg;
Content-Transfer-Encoding: base64


What am I doing wrong?

when you decode('base64') this string you get '<ZPublisher.HTTPRequest.
FileUpload instance at 0x9361fd4>\n  '  which means, that you have to find
out, which method or attribute of FileUpload gives you the actual data.
(what you got is FileUpload.__repr__() or __str__())

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to