From: Maciej Tronowski Date: Wed, 2 Sep 2015 13:18:45 +0000 (+0200) Subject: fix in handling file name with special characters X-Git-Tag: v1.1~25 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=c1f214f5c8b573427d5fe33b2f0b4aeb3257a551;hp=53b5d55ae94941e7621982e56438025527fa2950;p=qcg-portal.git fix in handling file name with special characters --- diff --git a/filex/views.py b/filex/views.py index ada8b7b..3215fd8 100644 --- a/filex/views.py +++ b/filex/views.py @@ -89,7 +89,7 @@ class DownloadView(FTPView): mime_type, encoding = mimetypes.guess_type(name) response = StreamingHttpResponse(data, content_type=mime_type or 'application/octet-stream') - response['Content-Disposition'] = u'attachment; filename={}'.format(name) + response['Content-Disposition'] = 'attachment; filename*={}'.format(urlquote(name)) response['Content-Length'] = stats['size'] if encoding: