mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-12 07:23:21 -05:00
Fix "undefined" when downloading a backup
This commit is contained in:
parent
f79698bb53
commit
787e8ceaec
@ -2930,7 +2930,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||||||
archive.on('error', function (err) { throw err; });
|
archive.on('error', function (err) { throw err; });
|
||||||
|
|
||||||
// Set the archive name
|
// Set the archive name
|
||||||
res.attachment(domain.title + '-Backup-' + new Date().toLocaleDateString().replace('/', '-').replace('/', '-') + '.zip');
|
res.attachment((domain.title ? domain.title : "Meshcentral") + '-Backup-' + new Date().toLocaleDateString().replace('/', '-').replace('/', '-') + '.zip');
|
||||||
|
|
||||||
// Pipe archive data to the file
|
// Pipe archive data to the file
|
||||||
archive.pipe(res);
|
archive.pipe(res);
|
||||||
|
Loading…
Reference in New Issue
Block a user