#6027: FileWrapper iterator drained by GzipMiddleware before content can be returned --------------------------------------------+------------------------------- Reporter: [EMAIL PROTECTED] | Owner: nobody Status: new | Milestone: Component: Core framework | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | --------------------------------------------+------------------------------- Comment (by ahlongxp):
I use this snippet {{{ response = HttpResponse() response['Content-Type'] = mimetype response['Content-Length'] = uf.file.size response['Content-Disposition'] = ('attachment; filename=\"' + uf.file.name + "\"") for chunk in uf.file.chunks(): response.write(chunk) return response }}} -- Ticket URL: <http://code.djangoproject.com/ticket/6027#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---