mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 04:33:16 +03:00
Fixed server crash on file download.
This commit is contained in:
parent
9c3aa6fd6a
commit
768df751f3
@ -203,7 +203,7 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us
|
||||
try { cmd = JSON.parse(data); } catch (ex) { }
|
||||
if ((cmd == null) || (typeof cmd.op == 'string')) {
|
||||
if (cmd.op == 'ok') {
|
||||
setContentDispositionHeader(this.res, 'application/octet-stream', filename, cmd.size, 'file.bin');
|
||||
setContentDispositionHeader(this.res, 'application/octet-stream', this.file, cmd.size, 'file.bin');
|
||||
} else {
|
||||
try { this.res.sendStatus(401); } catch (ex) { }
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.6.67",
|
||||
"version": "0.6.68",
|
||||
"keywords": [
|
||||
"Remote Device Management",
|
||||
"Remote Device Monitoring",
|
||||
|
Loading…
Reference in New Issue
Block a user