Skip to content

Commit

Permalink
Fixed issue where downloading an attachment with spaces didn't appear…
Browse files Browse the repository at this point in the history
… with the correct filename in the browser
  • Loading branch information
andrewbrazzatti committed Jul 12, 2019
1 parent 1db230f commit db105b7
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -75,6 +75,7 @@ def __activate__(self, context):
# Now the 'real' work of payload retrieval
if payload is not None:
filename = os.path.split(payload.getId())[1]
filename = "\"" + filename + "\""
mimeType = payload.getContentType()
if mimeType == "application/octet-stream":
self.response.setHeader("Content-Disposition", "attachment; filename=%s" % filename)
Expand Down

0 comments on commit db105b7

Please sign in to comment.