mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Added disk quota exceed notification.
This commit is contained in:
parent
be6ec894e3
commit
566897fd9a
1 changed files with 8 additions and 0 deletions
|
@ -3018,6 +3018,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})(xfile.fullpath, names[i], filedata);
|
})(xfile.fullpath, names[i], filedata);
|
||||||
|
} else {
|
||||||
|
// Send a notification
|
||||||
|
obj.parent.DispatchEvent([user._id], obj, { action: 'notify', title: "Disk quota exceed", value: names[i], nolog: 1, id: Math.random() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3048,10 +3051,15 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// Send a notification
|
||||||
|
obj.parent.DispatchEvent([user._id], obj, { action: 'notify', title: "Disk quota exceed", value: file.originalFilename, nolog: 1, id: Math.random() });
|
||||||
try { obj.fs.unlink(file.path, function (err) { }); } catch (e) { }
|
try { obj.fs.unlink(file.path, function (err) { }); } catch (e) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Send a notification
|
||||||
|
obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: "Disk quota exceed", nolog: 1, id: Math.random() });
|
||||||
}
|
}
|
||||||
res.send('');
|
res.send('');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue