mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
add osx custom filename to zip
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
6f47f2bc89
commit
473b9d0265
@ -5843,8 +5843,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
var archive = require('archiver')('zip', { level: 5 }); // Sets the compression method.
|
||||
archive.on('error', function (err) { throw err; });
|
||||
|
||||
// Customize the mesh agent file name
|
||||
var meshfilename = 'MeshAgent-' + mesh.name + '.zip'
|
||||
if ((domain.agentcustomization != null) && (typeof domain.agentcustomization.filename == 'string')) {
|
||||
meshfilename = meshfilename.split('meshagent').join(domain.agentcustomization.filename).split('MeshAgent').join(domain.agentcustomization.filename);
|
||||
}
|
||||
|
||||
// Set the agent download including the mesh name.
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshAgent-' + mesh.name + '.zip', null, 'MeshAgent.zip');
|
||||
setContentDispositionHeader(res, 'application/octet-stream', meshfilename, null, 'MeshAgent.zip');
|
||||
archive.pipe(res);
|
||||
|
||||
// Opens the "MeshAgentOSXPackager.zip"
|
||||
|
Loading…
Reference in New Issue
Block a user