try:
query = "select path from tableName where runid='4e9988-b6a8';"
response = session.execute(query)
for i in response:
if i is not None:
resp = Response(i, media_type="application/x-zip-compressed",
headers={
'Content-Disposition': 'attachment;filename=log.zip'
})
print("res", res.headers)
print("res", res)
return res
except Exception as e:
print(e)
response object is like:
Row(resultpath=b'PK\x03\x04\x14\x00\x00\x00\x00\x00(o\x8dS\x86(\xb0\xd6\x17\x00\x00\x00\x17\x00\x00\x00\x12\x00\x00\x00zipTrial/hello.txthello all i am visionPK\x01\x02\x14\x00\x14\x00\x00\x00\x00\x00(o\x8dS\x86(\xb0\xd6\x17\x00\x00\x00\x17\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x01\x00 \x00\x00\x00\x00\x00\x00\x00zipTrial/hello.txtPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00G\x00\x00\x00\x00\x00')