[Zope] manage_upload and file objects

Sedat Yilmazer sedat@kibele.com
Thu, 28 Jun 2001 16:25:23 +0300


This is a multi-part message in MIME format.

------=_NextPart_000_0035_01C0FFEE.EFC09950
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0036_01C0FFEE.EFC09950"


------=_NextPart_001_0036_01C0FFEE.EFC09950
Content-Type: text/plain;
	charset="windows-1254"
Content-Transfer-Encoding: quoted-printable

=20
 I have a special httpd clinet that sends the file encoded as base64 . =
In the DocLibrary product  they have
=20
  doc.manage_upload(REQUEST.file)
=20
=20
 I want to change that to something similar to=20
=20
 doc.manage_upload( base64.decodestring(REQUEST.file))
=20
 But manage_upload  waits for a file or an object that mimics a file and =
base64.decodestring needs a string ( base64.decode( f1,f2) needs f1 and =
f2 as file) =20
=20
so I need an object that mimics a file so I can
=20
 decoded ( file object ??)
=20
 base64.decode(REQUEST.file, decoded)
 doc.manage_manageupload( decoded )
=20
 is there such an object ? Any suggestions ?
=20
Sedat Yilmazer
Kibele Iletisim Sis. ve Serv. Ltd.
=20

------=_NextPart_001_0036_01C0FFEE.EFC09950
Content-Type: text/html;
	charset="windows-1254"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dwindows-1254">


<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D862421513-28062001>&nbsp;I have a=20
special httpd clinet that sends the file encoded as base64 . In the =
DocLibrary=20
product&nbsp; they have</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D862421513-28062001>&nbsp; =

doc.manage_upload(REQUEST.file)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D862421513-28062001>&nbsp;I want to=20
change that to something similar to </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001>&nbsp;doc.manage_upload(=20
base64.decodestring(REQUEST.file))</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><SPAN =
class=3D862421513-28062001></SPAN></FONT><FONT=20
face=3DArial size=3D2><SPAN class=3D862421513-28062001>&nbsp;But =
manage_upload&nbsp;=20
waits for a file or an object that mimics a file and base64.decodestring =
needs=20
a&nbsp;string ( base64.decode( f1,f2) needs f1 and f2 as=20
file)&nbsp;&nbsp;</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D862421513-28062001>so I =
need an object=20
that mimics a file so I can</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D862421513-28062001>&nbsp;decoded ( file=20
object ??)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001>&nbsp;base64.decode(REQUEST.file,=20
decoded)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001>&nbsp;doc.manage_manageupload( decoded=20
)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D862421513-28062001>&nbsp;is there such=20
an object ? Any suggestions ?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D862421513-28062001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D862421513-28062001></SPAN></FONT><FONT=20
face=3DArial size=3D2>Sedat Yilmazer</FONT></DIV>
<DIV><FONT face=3D"Arial TUR" size=3D2>Kibele Iletisim Sis. ve Serv.=20
Ltd.</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_001_0036_01C0FFEE.EFC09950--

------=_NextPart_000_0035_01C0FFEE.EFC09950
Content-Type: application/octet-stream;
	name="Sedat Yilmazer (E-mail).vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Sedat Yilmazer (E-mail).vcf"

BEGIN:VCARD
VERSION:2.1
N:Yilmazer;Sedat
FN:Sedat Yilmazer (E-mail)
ORG:Kibele
TEL;WORK;VOICE:+90 (212) 293 05 80
TEL;CELL;VOICE:+90 (532) 272 68 89
TEL;WORK;FAX:+90 (212) 292 07 44
ADR;WORK;ENCODING=3DQUOTED-PRINTABLE:;;Somuncu Sok. =
17/5=3D0D=3D0AFindikli;Beyoglu;ISTANBUL;80040;Turkey
LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:Somuncu Sok. =
17/5=3D0D=3D0AFindikli=3D0D=3D0ABeyoglu, ISTANBUL 80040=3D0D=3D0ATurkey
EMAIL;PREF;INTERNET:sedat@kibele.com
REV:20010330T091840Z
END:VCARD

------=_NextPart_000_0035_01C0FFEE.EFC09950--