[Zope] URGENT: Serving a File object from an external method.
Jay, Dylan
djay@lucent.com
Thu, 1 Jul 1999 11:26:19 +1000
I want to have a url that returns a binary object that is dynamically
generated. I have created an external method with something like the
following:
from OFS.Image import File
f = File('ASGL', 'ASGL', res, content_type='application/octet-stream')
return f
If I do a print f.content_type I get 'application/octet-stream'. If I do
the following (doCommand is the external method):
f = urllib.urlopen("http://here.com:9673/doCommand")
print f.info()
I get the following:
Server: ZopeHTTP/1.16 Python/1.5.1
Date: Thu, 01 Jul 1999 01:19:28 GMT
Content-Length: 96
Content-Type: text/plain
What am I doing wrong? How do I get an dynamically generated binary file?