[Zope] File uploader

Eric Walstad eric@walstads.net
Fri, 17 Aug 2001 11:46:33 -0700


Hi Todd,

Please, no HTML postings to the mailing list.

I would try:
<dtml-with "folders.folder1">
    <dtml-call expr="manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])">
</dtml-with>
<dtml-call "RESPONSE.redirect('./index_html')">

or without dtml-with:

<dtml-call expr="folders.folder1.manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])">
<dtml-call "RESPONSE.redirect('./index_html')">

Have a look at:
(http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/3CDF86E3FBF55B3A
)
for other options.

Eric.

-----Original Message-----
From: Todd Loomis [mailto:tloomis@dmso.mil]
Sent: Friday, August 17, 2001 11:27 AM
To: eric@walstads.net; zope@zope.org
Subject: RE: [Zope] File uploader


Eric:

When I use the code bleow I have no problem uploading a file:

<dtml-with "folders">
    <dtml-call expr="manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])">
</dtml-with>
<dtml-call "RESPONSE.redirect('./index_html')">

However if I want to upload to another folder within the folder i get this
error:

Error Type: AttributeError
Error Value: __div__

Here's the code I used:

<dtml-with "folders/folder1">
    <dtml-call expr="manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])">
</dtml-with>
<dtml-call "RESPONSE.redirect('./index_html')">

How can I or can this be done?

Thanks,
Todd