mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Use content-disposition for setting the Content-Disposition header (#13072)
GitOrigin-RevId: f84100beb5e00485be4732c954b5ee553fe18558
This commit is contained in:
@@ -379,9 +379,9 @@ describe('CompileController', function () {
|
||||
})
|
||||
|
||||
it('should set the content-disposition header with a safe version of the project name', function () {
|
||||
this.res.setContentDisposition
|
||||
.calledWith('', { filename: 'test_nam_.pdf' })
|
||||
.should.equal(true)
|
||||
this.res.setContentDisposition.should.be.calledWith('inline', {
|
||||
filename: 'test_nam_.pdf',
|
||||
})
|
||||
})
|
||||
|
||||
it('should increment the pdf-downloads metric', function () {
|
||||
|
||||
@@ -81,9 +81,9 @@ describe('FileStoreController', function () {
|
||||
|
||||
it('should set the Content-Disposition header', function (done) {
|
||||
this.stream.pipe = des => {
|
||||
this.res.setContentDisposition
|
||||
.calledWith('attachment', { filename: this.file.name })
|
||||
.should.equal(true)
|
||||
this.res.setContentDisposition.should.be.calledWith('attachment', {
|
||||
filename: this.file.name,
|
||||
})
|
||||
done()
|
||||
}
|
||||
this.controller.getFile(this.req, this.res)
|
||||
|
||||
Reference in New Issue
Block a user