[Zope] zpublisher instance

J Cameron Cooper jccooper at jcameroncooper.com
Thu Aug 28 19:36:34 EDT 2003


>>>How do I reference a ZPublisher.HTTPRequest.FileUpload instance?
>>>      
>>>
>>Don't overthink it. It's just like you'd access any request parameter,
>>save that it's a Python file-ish object.
>>
>Thanks for the info. My file-ish object wasn't coming from a form, so I
>didn't have a parameter in the request object to reference. The data (xml)
>are coming from a pdf form submit. I know it's in there because the
>content-type is correct and the content-length look right. But without the
>parameter handle, I didn't know how to get it. This could be a problem
>with the way Adobe does the submit I suppose.
>  
>
I'm not sure I understand: I've never done anything with PDF besides read.

If it sends a real HTTP request, you should be able to use it. You can 
find out the request parameter if you don't know it. Simply print the 
REQUEST object. (You can also use 'REQUEST.text()'.) Wow, that's a lot 
of punctuation. If it's doing something strange, and doesn't end up in 
the form, maybe it's in 'REQUEST.other". In any case, you should be able 
to introspect it, at the very least by submitting to something that will 
log the contents of the request as above. You can also watch the 
conversation with various network tools. There's one that's a favorite 
on this list, but I forget the name.

          --jcc




More information about the Zope mailing list