[Zope] File object converted into string ????
Gitte Wange
gitte@mmmanager.org
Fri, 20 Jul 2001 16:20:01 +0200
Hello again - I am sorry to bother you guys so much today
I just get this weird error thing ... a file I'm trying to upload through
http is being converted into a string ????
I'm not doing anything unusual ... and the upload code works in another
context.
I have this form field on a page with a file field ... I browse for a file
and hit the submit button.
When the code reaches the lines of the upload action I get this error:
Error Type: AttributeError
Error Value: 'string' object has no attribute 'filename'
And the REQUEST object tells me this:
file '/home/gitte/405themovie.rm'
This should have been a file object :-((
I am not touching the file argument before I try to upload it .. I can't see
what is going wrong.
Here's a snip from the script that receives the file...
<dtml-if "REQUEST.has_key('file')">
<dtml-let masterfileid="id + '_MasterFile'"
file_title="title"
file_desc="description"
file_xsize="xsize"
file_ysize="ysize"
file_medianet="medianet">
<dtml-call "invokeFactory(id=masterfileid, type_name='Master File')">
<dtml-with "restrictedTraverse(masterfileid)">
<dtml-let filepath="this().absolute_url(relative=1)">
<dtml-call "editFile(REQUEST['file'])">
The last line is the call to the upload function ...
So ... can anybody tell me what is going wrong ??
Regards,
--
Gitte Wange Jensen
Sys Admin, Developer and a lot more
MMmanager.org Aps, Denmark
Phone: +45 29 72 79 72
Email: gitte@mmmanager.org
Web: www.mmmanager.org
Quote of the day:
> every vote will cause the Data.fs to grow. how do you handle that?
Erm yeah it will. Im just taking the Microsoft approach and ignoring it
- Andy McKay, 31 Jan 2001