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()
Jason Leach schrieb:
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?
just a guess, for I had something similar some days ago: may be you're opening the zip file on windows with winzip or something alike, and your zip includes files with "bad" characters in their names? in my case, it was a colon (:) that windows wouldn't like. if you can, try to open the zip on a different platform like linux to see if it behaves different. Of course, first of all you should verify that the zipfile has a size > 0 byte :-) Hope it helps, Sascha
participants (2)
-
Jason Leach -
Sascha Ottolski