7
OK, it turns out it is a little easier than I thought. I could easily do this:
zip_file = open(zip_file_path, 'rb')
response = HttpResponse(zip_file, content_type='application/zip')
response['Content-Disposition'] = 'attachment; filename=name.zip'
return response
0
Appending a byte array is assumed to be executed with an integer that will have the value of the appended byte, since append
is mostly comprehended as an operation of adding an item to an array, and bytearray
is a numerical sequence.
For arrays concatenation, just use the +
operator, like strings:
zip_byte_array += byte_content
- [Django]-User Authentication in Django
- [Django]-Good ways to import data into Django
- [Django]-Django sites framework and Heroku
- [Django]-Css not working with FastCGI and Lighttpd
- [Django]-Why "no such table: django_session" when trying to use admin?
Source:stackexchange.com