fix in handling file name with special characters
[qcg-portal.git] / filex / views.py
index ada8b7b..3215fd8 100644 (file)
@@ -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: