|
@@ -20,7 +20,7 @@ from tracim.controllers import TIMWorkspaceContentRestController
|
20
|
20
|
from tracim.lib import CST
|
21
|
21
|
from tracim.lib.base import BaseController
|
22
|
22
|
from tracim.lib.base import logger
|
23
|
|
-from tracim.lib.utils import SameValueError
|
|
23
|
+from tracim.lib.utils import SameValueError, get_valid_header_file_name
|
24
|
24
|
from tracim.lib.content import ContentApi
|
25
|
25
|
from tracim.lib.helpers import convert_id_into_instances
|
26
|
26
|
from tracim.lib.predicates import current_user_is_reader
|
|
@@ -231,7 +231,9 @@ class UserWorkspaceFolderFileRestController(TIMWorkspaceContentRestController):
|
231
|
231
|
tg.response.headers['Content-type'] = str(revision_to_send.file_mimetype)
|
232
|
232
|
|
233
|
233
|
tg.response.headers['Content-Type'] = content_type
|
234
|
|
- tg.response.headers['Content-Disposition'] = str('attachment; filename="{}"'.format(revision_to_send.file_name))
|
|
234
|
+ file_name = get_valid_header_file_name(revision_to_send.file_name)
|
|
235
|
+ tg.response.headers['Content-Disposition'] = \
|
|
236
|
+ str('attachment; filename="{}"'.format(file_name))
|
235
|
237
|
return revision_to_send.file_content
|
236
|
238
|
|
237
|
239
|
|