mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Now, whenever someone requests a backup file, it will automatically suggest a default file name for the downloaded file.
This commit is contained in:
parent
9967a5dc66
commit
9519f6418d
@ -42,6 +42,9 @@ class BackupController {
|
||||
Logger.debug(`Use X-Accel to serve static file ${encodedURI}`)
|
||||
return res.status(204).header({ 'X-Accel-Redirect': encodedURI }).send()
|
||||
}
|
||||
|
||||
res.setHeader('Content-disposition', 'attachment; filename=' + req.backup.filename)
|
||||
|
||||
res.sendFile(req.backup.fullPath)
|
||||
}
|
||||
|
||||
@ -65,4 +68,4 @@ class BackupController {
|
||||
next()
|
||||
}
|
||||
}
|
||||
module.exports = new BackupController()
|
||||
module.exports = new BackupController()
|
||||
|
Loading…
Reference in New Issue
Block a user