2đź‘Ť
âś…
For windows, you need to add “rb” to file.
like so:
wrapper = FileWrapper(file(tarfilename,'rb'))
Also, Content-Length should use a integer, not a string
like so:
response['Content-Length'] = os.path.getsize(tarfilename)
👤michael
Source:stackexchange.com