Skip to content

Commit

Permalink
fix: 去除可能导致文件下载产生错误的因素
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Mar 2, 2020
1 parent 6302256 commit 16f5a90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/controllers/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class fileController extends baseController {
}

ctx.set('Content-Type', file.mimeType)
ctx.set('Content-Disposition', `attachment; filename=${JSON.stringify(file.name)}`)
ctx.set('Cache-Control', 'max-age=31536000')
ctx.set('Cache-Control', 'max-age=315360000')

ctx.body = new Buffer(file.base64, 'base64')
}
}
Expand Down

0 comments on commit 16f5a90

Please # to comment.