Browse Source

fix: override upload cache content-type

pull/861/head
Nick 5 years ago
parent
commit
d27ffe7ca4
1 changed files with 1 additions and 0 deletions
  1. 1
      server/models/assets.js

1
server/models/assets.js

@ -111,6 +111,7 @@ module.exports = class Asset extends Model {
const cachePath = path.join(process.cwd(), `data/cache/${fileHash}.dat`)
return new Promise((resolve, reject) => {
res.type(path.extname(assetPath))
res.sendFile(cachePath, { dotfiles: 'deny' }, err => {
if (err) {
resolve(false)

Loading…
Cancel
Save