[Zope] Re: [HELP] How to get the content of a REQUEST

Frédéric LEMAITRE fred_lemaitre at yahoo.com
Mon Jan 12 08:00:10 EST 2004


Hello,

I don't really agree.
In fact, the "object" from which i want the content
isn't stored in the ZODB. 

Adobe Acrobat calls my python script witch the content
in-line in the request. My need is to :

-1- Create an ZODB file named "My_File.pdf" ==> Ok

-2- Put the content of the REQUEST (the content of the
PDF file) into the "My_File.pdf" ==> My question is
how to get the content passed in-line in the REQUEST.

I'm gonna try "my_content = context.REQUEST['BODY']"
(thanks Ed Leafe).

Frédéric.


--- Andreas Jung <andreas at andreas-jung.com> wrote:
> Your approach is somewhat weird. The REQUEST does
> not hold any content
> from any object. You can use restrictedTraverse() to
> *obtain* a reference
> to the corresponding object *with the informations*
> stored *with the 
> REQUEST*.
> if you have the refreence to the object you can use
> the API of the object
> to retrieve its content.
> 
> -aj
> 
> --On Sonntag, 11. Januar 2004 12:23 Uhr +0100
> Frédéric LEMAITRE 
> <fred_lemaitre at yahoo.com> wrote:
> 
> > Hello,
> >
> > There is something (maybe simple) that i don't
> manage
> > do to. I want to get the content of a REQUEST from
> a
> > python script.
> >
> > In fact, there is another application (adobe PDF
> form)
> > that calls my zope site via a POST method REQUEST
> and
> > give me the file in-line in the request.
> >
> > I want to get the content of this file in order to
> > generate a file object stored in my ZoDB.
> >
> > Is there something like :
> >  REQUEST.getContent()
> >  REQUEST.read()
> >
> >
> > Help needed.
> > Thanks in advance
> > Frédéric
> >
> > P.S : Execuse my english


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus



More information about the Zope mailing list