zf.close()
response = HttpResponse(file.getvalue(), mimetype='application/zip')
response['Content-Disposition'] = 'attachment; filename=yourfiles.zip'
return response
Create zip archive for instant download