Fixed bug with download of BLOB null, refs #1050

This commit is contained in:
Simon Willison 2020-10-28 21:05:40 -07:00
commit 89519f9a37
4 changed files with 28 additions and 10 deletions

View file

@ -1083,7 +1083,7 @@ class BlobView(BaseView):
"Content-Disposition": 'attachment; filename="{}"'.format(filename),
}
return Response(
body=rows[0][column],
body=rows[0][column] or b"",
status=200,
headers=headers,
content_type="application/binary",