Commit da649f5d08f59b18b5d6e7a90ec34c6435417051
1 parent
399ed573
Exists in
master
and in
3 other branches
Changin download file name to uploaded file name
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
file_link/views.py
... | ... | @@ -50,7 +50,7 @@ class DownloadFile(LoginRequiredMixin, LogMixin, generic.DetailView): |
50 | 50 | response['Pragma'] = 'public' |
51 | 51 | response['Expires'] = '0' |
52 | 52 | response['Cache-Control'] = 'must-revalidate, post-check=0, pre-check=0' |
53 | - response['Content-Disposition'] = 'attachment; filename=%s' % file_link.name | |
53 | + response['Content-Disposition'] = 'attachment; filename=%s' % file_link.filename | |
54 | 54 | response['Content-Transfer-Encoding'] = 'binary' |
55 | 55 | response['Content-Length'] = str(path.getsize(file_link.file_content.path)) |
56 | 56 | ... | ... |