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:
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user