mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #19006 - Quoted filenames in Content-Disposition header.
This commit is contained in:
@@ -590,7 +590,7 @@ To tell the browser to treat the response as a file attachment, use the
|
||||
this is how you might return a Microsoft Excel spreadsheet::
|
||||
|
||||
>>> response = HttpResponse(my_data, content_type='application/vnd.ms-excel')
|
||||
>>> response['Content-Disposition'] = 'attachment; filename=foo.xls'
|
||||
>>> response['Content-Disposition'] = 'attachment; filename="foo.xls"'
|
||||
|
||||
There's nothing Django-specific about the ``Content-Disposition`` header, but
|
||||
it's easy to forget the syntax, so we've included it here.
|
||||
|
||||
Reference in New Issue
Block a user