From c1f214f5c8b573427d5fe33b2f0b4aeb3257a551 Mon Sep 17 00:00:00 2001 From: Maciej Tronowski Date: Wed, 2 Sep 2015 15:18:45 +0200 Subject: [PATCH] fix in handling file name with special characters --- filex/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 1.7.9.5