Added disk quota exceed notification.

Ylian Saint-Hilaire committed Jul 15, 2020 at 14:11 UTC 566897fd9add6fb03987189a644dda097629b14c
1 file changed +8
webserver.js
+8
@@ -3018,6 +3018,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
3018 });
3019 });
3020 })(xfile.fullpath, names[i], filedata);
3021 + } else {
3022 + // Send a notification
3023 + obj.parent.DispatchEvent([user._id], obj, { action: 'notify', title: "Disk quota exceed", value: names[i], nolog: 1, id: Math.random() });
3024 }
3025 }
3026 }
@@ -3048,10 +3051,15 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
3051 }
3052 });
3053 } else {
3054 + // Send a notification
3055 + obj.parent.DispatchEvent([user._id], obj, { action: 'notify', title: "Disk quota exceed", value: file.originalFilename, nolog: 1, id: Math.random() });
3056 try { obj.fs.unlink(file.path, function (err) { }); } catch (e) { }
3057 }
3058 }
3059 }
3060 + } else {
3061 + // Send a notification
3062 + obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: "Disk quota exceed", nolog: 1, id: Math.random() });
3063 }
3064 res.send('');
3065 });