Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
piks3l
Respect My Net
Commits
af1e9241
Commit
af1e9241
authored
Nov 04, 2011
by
stef
Browse files
[fix] correct filename for attachs with spaces
parent
b603f40f
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
af1e9241
...
...
@@ -234,7 +234,7 @@ def get_attach(request,id):
f
=
get_object_or_404
(
Attachment
,
pk
=
id
)
wrapper
=
FileWrapper
(
f
.
storage
)
response
=
HttpResponse
(
wrapper
,
mimetype
=
f
.
type
)
response
[
'Content-Disposition'
]
=
'attachment; filename=%s'
%
f
.
name
response
[
'Content-Disposition'
]
=
'attachment; filename=
"
%s
"
'
%
f
.
name
response
[
'Content-Length'
]
=
f
.
storage
.
size
return
response
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment