Use content-disposition for setting the Content-Disposition header (#13072)

GitOrigin-RevId: f84100beb5e00485be4732c954b5ee553fe18558
This commit is contained in:
Alf Eaton
2023-05-17 08:05:10 +00:00
committed by Copybot
parent fefc8384fb
commit 7f795e4c8b
6 changed files with 14 additions and 15 deletions
@@ -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)