我的英语不好,因为我来自台湾,所以我将尽力描述我的问题。我正在使用FileWrapper下载大文件,但我不知道如何在单个响应中下载多个文件。我还能使用什么其他方法?try: mms = message.objects.get(token=token)except message.DoesNotExist: return HttpResponse('ret=1&msg=Invalid arguments&')try: attach = mms.message_attach_set.get(id = int(attach_id))except message_attach.DoesNotExist: return HttpResponse('ret=1&msg=Invalid arguments&')response = HttpResponse(FileWrapper(attach.file), mimetype='application/force-download')response['Content-Length'] = str(attach.file.size)response['X-Sendfile'] = '%s' % (attach.realName)return response
添加回答
举报
0/150
提交
取消