[Zope] dtml-boundary is killing me!!! HELP!!!!
Curtis Maloney
curtis@umd.com.au
Fri, 24 Mar 2000 10:29:31 +1100
On Fri, 24 Mar 2000, Hugo Ramos wrote:
> yellow,
>
> As I was trying to send an attachment via Zope to whatever@somewhere.com i
> wanted the dtml-boundary tag to do something like this:
>
> <dtml-boundary type=application/octet-stream disposition=attachment
> encode=base64 name="_['file.filename']">
>
> but I just can't get this to work... the only way it works is to use the
> attribute name=file
> The result is an attachment file.dat
> I want Zope to send the attachment with the real filename.
>
> HELP???
>
I have run into this problem before. Floating about on the ZOPE site is a
patch for the MIMETools, which addes a few *_expr attributes, so you can replace
name="_['file.filename']"
with:
name_expr="_['file.filename]"
I have just written my own tag product (may or may not be allowed to release..
we'll see :) I understand now why this is so. It seems that, so far as the
product is concerned, there is no real way to tell the difference between a
string and an expression.
If I am mistaken, I would dearly LOVE someone to point me in the right
direction. I currently distinguish vars and strings by if they have 's around
them, and expressions are attrib_expr.
But I digress.... the patch is your friend.. It is on the ZOPE site (sorry I
can't be more specific, but a quick search will find it.) I have used it
myself, and know it works.
--
Have a better one,
Curtis.
<dtml-var standard_work_disclaimer>