[Zope] ZFSPath Product.
Jason Leach
jason.leach at gmail.com
Mon Dec 13 14:56:18 EST 2004
hi,
With ZFSPath product I can save a fille (a ZIP) and open it, but I
can't 'open with' when I click on it; it shows up as an empty ZIP
file. Any idea what's up with that?
I am setting a few headers along the way:
results = container['sqlSelectProductByMD5'](md5hash=id).dictionaries()[0]
container.REQUEST.RESPONSE.setHeader('Content-Type', 'application/zip')
container.REQUEST.RESPONSE.setHeader('Content-type', 'application/octet-stream')
container.REQUEST.RESPONSE.setHeader('Content-transfer-encoding', 'binary')
container.REQUEST.RESPONSE.setHeader('Content-disposition','attachment;filename=%s-%s.zip'
% (results['license'], results['level']))
container.REQUEST.RESPONSE.setHeader('Content-length',len(
container.reports['outgoing']['%s-%s.zip' % (results['license'],
results['level'])].bytes()))
return container.reports['outgoing']['%s-%s.zip' %
(results['license'], results['level'])].bytes()
More information about the Zope
mailing list