[Zope] File upload - get only the path - not content
Gustav Franzsen
gustav@ybm.co.za
Tue, 16 Jan 2001 10:05:56 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_003D_01C07FA3.EAFBA110
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I've looked at Zope HowTo on getting a "neat filename" stripped when =
uploading one. I also scoured the mailing lists on anything dealing =
with manage-addFile, but only succeeded in finding someone who =
encountered the same problem I have - no solution that works yet, though =
! As far as the file_size limitation in uploading is concerned, I would =
be thankful to encounter that problem because then at least the damn =
file is trying to upload fully ! I am not even there yet ....
Here's the problem:
We have developed a product that, amongst other things, manages the =
client's Product Documentation. He can add Manuals (Manual_ZClass with =
Object Manager Base Class and ZPatterns Specialist) and then upload =
associated files for the specific manual. The file uploads but it is =
only a reference (path) to the file that loads - almost like a shortcut. =
It seems as if the actual file does not upload.
form action does have enctype and post-method
I use a Python Method that looks like this:
FileID=3Dfile[_.max(_.string.rfind(file, '/'),
_.string.rfind(file, '\\'),
_.string.rfind(file, ':'),
)+1:]
self.manage_addFile(FileID, file)
parameters passed are: "self, file"
I'm a bit of a newbie - and stumped ! Any ideas would be appreciated.
Gustav Franzsen
------=_NextPart_000_003D_01C07FA3.EAFBA110
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>I've looked at Zope HowTo on getting a "neat =
filename"=20
stripped when uploading one. I also scoured the mailing lists on =
anything=20
dealing with manage-addFile, but only succeeded in finding someone who=20
encountered the same problem I have - no solution that works yet, though =
! =20
As far as the file_size limitation in uploading is concerned, I would be =
thankful to encounter that problem because then at least the damn file =
is trying=20
to upload fully ! I am not even there yet ....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>Here's the problem:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>We have developed a product that, amongst other =
things,=20
manages the client's Product Documentation. He can add Manuals=20
(Manual_ZClass with Object Manager Base Class and ZPatterns Specialist) =
and then=20
upload associated files for the specific manual. The file uploads =
but it=20
is only a reference (path) to the file that loads - almost like a=20
shortcut. It seems as if the actual file does not =
upload.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>form action does have enctype and =
post-method</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>I use a Python Method that looks like =
this:</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>FileID=3Dfile[_.max(_.string.rfind(file,=20
'/'),<BR> _.string.rfind(file, =
'\\'),<BR> =
_.string.rfind(file,=20
':'),<BR> =20
)+1:]<BR>self.manage_addFile(FileID, file)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>parameters passed are: "self, file"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>I'm a bit of a newbie - and stumped ! Any =
ideas=20
would be appreciated.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>Gustav Franzsen</FONT></DIV></BODY></HTML>
------=_NextPart_000_003D_01C07FA3.EAFBA110--