Skip to content

Commit

Permalink
Merge pull request #9024 from paulovitin/amazons3-special-chars
Browse files Browse the repository at this point in the history
[FIX] Use encodeURI in AmazonS3 contentDisposition file.name to prevent fail
  • Loading branch information
rodrigok committed Dec 7, 2017
2 parents 575bd88 + abe9713 commit e2b99ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-file-upload/ufs/AmazonS3/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class AmazonS3Store extends UploadFS.Store {
Key: this.getPath(file),
Body: writeStream,
ContentType: file.type,
ContentDisposition: `inline; filename="${ file.name }"`
ContentDisposition: `inline; filename="${ encodeURI(file.name) }"`

}, (error) => {
if (error) {
Expand Down

0 comments on commit e2b99ea

Please sign in to comment.