[Zope] File uploader

Todd Loomis tloomis@dmso.mil
Fri, 17 Aug 2001 14:27:18 -0400


--=====================_680984523==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

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

At 09:46 AM 8/17/2001 -0700, you wrote:
>Todd,
>Are you using a LocalFS object or trying to store the files as Zope File
>objects?
>Eric.
>
>-----Original Message-----
>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Todd
>Loomis
>Sent: Friday, August 17, 2001 9:04 AM
>To: eric@walstads.net; zope@zope.org
>Subject: RE: [Zope] File uploader
>
>
>I keep getting this error after trying this code:
>
>Error Type: NameError
>Error Value: manage_upload
>
>
>At 08:50 AM 8/17/2001 -0700, you wrote:
> >Hi Todd,
> >Do you want to store your files on the local file system or in Zope as File
> >objects?
> >Either way, have a look at how the 'Add File' form works in Zope.  That'll
> >show you how to get the file up to Zope.  From there you will need to move
> >it to the folder you want.
> >I upload to a LocalFS object ('data').

--=====================_680984523==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Eric:<br>
<br>
When I use the code bleow I have no problem uploading a file:<br>
<br>
&lt;dtml-with &quot;folders&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;dtml-call
expr=&quot;manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])&quot;&gt;<br>
&lt;/dtml-with&gt;<br>
&lt;dtml-call &quot;RESPONSE.redirect('./index_html')&quot;&gt;<br>
<br>
However if I want to upload to another folder within the folder i get
this error: <br>
<br>
<b>Error Type: AttributeError<br>
Error Value: __div__<br>
<br>
</b>Here's the code I used: <br>
<br>
&lt;dtml-with &quot;folders/folder1&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;dtml-call
expr=&quot;manage_addFile(id=REQUEST['FileName'],
file=REQUEST['file'])&quot;&gt;<br>
&lt;/dtml-with&gt;<br>
&lt;dtml-call &quot;RESPONSE.redirect('./index_html')&quot;&gt;<br>
<br>
How can I or can this be done?<br>
<br>
Thanks,<br>
Todd<br>
<br>
At 09:46 AM 8/17/2001 -0700, you wrote:<br>
<blockquote type=cite cite>Todd,<br>
Are you using a LocalFS object or trying to store the files as Zope
File<br>
objects?<br>
Eric.<br>
<br>
-----Original Message-----<br>
From: zope-admin@zope.org
[<a href="mailto:zope-admin@zope.org%5DOn" eudora="autourl">mailto:zope-admin@zope.org]On</a>
Behalf Of Todd<br>
Loomis<br>
Sent: Friday, August 17, 2001 9:04 AM<br>
To: eric@walstads.net; zope@zope.org<br>
Subject: RE: [Zope] File uploader<br>
<br>
<br>
I keep getting this error after trying this code:<br>
<br>
Error Type: NameError<br>
Error Value: manage_upload<br>
<br>
<br>
At 08:50 AM 8/17/2001 -0700, you wrote:<br>
&gt;Hi Todd,<br>
&gt;Do you want to store your files on the local file system or in Zope
as File<br>
&gt;objects?<br>
&gt;Either way, have a look at how the 'Add File' form works in
Zope.&nbsp; That'll<br>
&gt;show you how to get the file up to Zope.&nbsp; From there you will
need to move<br>
&gt;it to the folder you want.<br>
&gt;I upload to a LocalFS object ('data').</blockquote></html>

--=====================_680984523==_.ALT--