Merge pull request #12654 from overleaf/em-td-upload-filename-encoding

Fix filename encoding of project and file uploads

GitOrigin-RevId: e718c8f8f376772ee13c50c82d26848977e16eef
This commit is contained in:
Eric Mc Sween
2023-04-19 08:03:13 +00:00
committed by Copybot
parent cff54eae78
commit 5b804ceefd
5 changed files with 13 additions and 6 deletions
@@ -61,7 +61,9 @@ describe('ProjectUploadController', function () {
this.name = 'filename.zip'
this.req.file = {
path: this.path,
originalname: this.name,
}
this.req.body = {
name: this.name,
}
this.req.session = {
user: {
@@ -165,7 +167,9 @@ describe('ProjectUploadController', function () {
this.name = 'filename.png'
this.req.file = {
path: this.path,
originalname: this.name,
}
this.req.body = {
name: this.name,
}
this.req.session = {
user: {
@@ -257,7 +261,7 @@ describe('ProjectUploadController', function () {
describe('with an invalid filename', function () {
beforeEach(function () {
this.req.file.originalname = ''
this.req.body.name = ''
return this.ProjectUploadController.uploadFile(this.req, this.res)
})