On Wednesday 09 July 2008, Tino Wildenhain wrote:
> William Heymann wrote:
> > I am trying to integrate a webcamera with a site and I can get it to POST
> > the data to a certain url on the server the problem is I can't figure out
> > how to get access to the data. It is not in REQUEST.form
> >
> > the relevant request vars are
> >
> > ('CONTENT_LENGTH', '111695')
> > ('CONTENT_TYPE', 'image/jpeg')
> > ('HTTP_CONTENT_DISPOSITION', 'attachment;
> > filename="image01-07-29_05-54-26-96.jpg"')
> >
> > This is being posted to a python script object inside zope, however if I
> > need to use an external method that is not a problem I just need to
> > figure out how to get the data.
> If the file is posted as attachment (similar to file upload) it should
> appear in the relevant form element as file. You can just use the method
> .read() on it to get the data (or feed it into factory of image/file)

Unfortunately it is now showing up in REQUEST.form, it is not a POST like what 
you get with a file upload from a form. Zope is showing that the correct size 
of data was sent to that page.

> For this to work the data needs to be sent as
> enctype="multipart/form-data" (hopefully the cam does this).

It was not sent with that kind of encoding at least not in any way I can tell. 
It was a webcam and all I could give it was a url to POST the data to and it 
did not submit it like a regular form.

> Maybe you send all variables of the request to figure out.
> Regards
> Tino

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to