We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8b65f commit a780a0bCopy full SHA for a780a0b
blog/views.py
@@ -197,7 +197,7 @@ def file_iterator(file_name, chunk_size=512):
197
file_path = os.path.join(UPLOADPATH, article_id, file_name)
198
response = FileResponse(file_iterator(file_path))
199
response['Content-Type'] = 'application/octet-stream'
200
- response['Content-Disposition'] = 'attachment;filename=%s' % file_name
+ response['Content-Disposition'] = 'attachment;filename=%s' % file_name.encode('utf-8')
201
return response
202
203
class CategoryView(ListView):
0 commit comments