[Zope] MailHost Question
Dieter Maurer
dieter@handshake.de
Wed, 16 Jan 2002 20:19:29 +0100
Michael writes:
> I'm trying to set up a mail form that has file upload capabilities. I'm
> using the code below and it works, but one has to enter the filename manually
> to get it to show up by the attachment icon. Is there any way to have the
> file name automagically entered?
>
> <dtml-boundary type="application/octet-stream" disposition="attachment"
> encode="base64" filename_expr="doc_name"> <dtml-var
> expr="resume_file.read()"></dtml-mime>
>
> I know I can use filename_expr="resume_file.getId() if I'm using a document
> from Zope, but I would like an anonymous user to be able to use this as well.
Hm.
Your problem is difficult to understand:
Usually "getId" i callable by "Anonymous". Why are you worried?
Usually, using a "MailHost" is protected quite heavily.
You either must relax the protection (making your site open
for email abuse) or use a Proxy role. But in the second
case, you can use 'Manager' such that you can call
any non-private method.
So, what does not work?
Dieter