Show More
@@ -136,9 +136,9 b' class FilesController(BaseRepoController' | |||||
136 | h.flash(str(e), category='warning') |
|
136 | h.flash(str(e), category='warning') | |
137 | redirect(h.url('files_home', repo_name=repo_name, revision=cs.raw_id)) |
|
137 | redirect(h.url('files_home', repo_name=repo_name, revision=cs.raw_id)) | |
138 |
|
138 | |||
|
139 | fname = f_path.split('/')[-1].encode('utf8', 'replace') | |||
139 | response.content_type = file_node.mimetype |
|
140 | response.content_type = file_node.mimetype | |
140 |
response.content_disposition = 'attachment; filename=%s' |
|
141 | response.content_disposition = 'attachment; filename=%s' % fname | |
141 | % f_path.split('/')[-1] |
|
|||
142 | return file_node.content |
|
142 | return file_node.content | |
143 |
|
143 | |||
144 | def raw(self, repo_name, revision, f_path): |
|
144 | def raw(self, repo_name, revision, f_path): |
General Comments 0
You need to be logged in to leave comments.
Login now