fix: override upload cache content-type
This commit is contained in:
parent
212286fc4a
commit
d27ffe7ca4
@ -111,6 +111,7 @@ module.exports = class Asset extends Model {
|
|||||||
const cachePath = path.join(process.cwd(), `data/cache/${fileHash}.dat`)
|
const cachePath = path.join(process.cwd(), `data/cache/${fileHash}.dat`)
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
res.type(path.extname(assetPath))
|
||||||
res.sendFile(cachePath, { dotfiles: 'deny' }, err => {
|
res.sendFile(cachePath, { dotfiles: 'deny' }, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
resolve(false)
|
resolve(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user