mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
Fixed MeshCtrl file upload.
This commit is contained in:
parent
b53cbc67a5
commit
91830f89a3
@ -1349,6 +1349,7 @@ function serverConnect() {
|
|||||||
case 'addusertousergroup':
|
case 'addusertousergroup':
|
||||||
case 'removeuserfromusergroup':
|
case 'removeuserfromusergroup':
|
||||||
case 'userbroadcast': { // BROADCAST
|
case 'userbroadcast': { // BROADCAST
|
||||||
|
if (settings.cmd == 'upload') return;
|
||||||
if ((settings.multiresponse != null) && (settings.multiresponse > 1)) { settings.multiresponse--; break; }
|
if ((settings.multiresponse != null) && (settings.multiresponse > 1)) { settings.multiresponse--; break; }
|
||||||
if (data.responseid == 'meshctrl') {
|
if (data.responseid == 'meshctrl') {
|
||||||
if (data.meshid) { console.log(data.result, data.meshid); }
|
if (data.meshid) { console.log(data.result, data.meshid); }
|
||||||
@ -1660,7 +1661,7 @@ function connectTunnel(url) {
|
|||||||
settings.uploadSize = require('fs').statSync(args.file).size;
|
settings.uploadSize = require('fs').statSync(args.file).size;
|
||||||
settings.uploadFile = require('fs').openSync(args.file, 'r');
|
settings.uploadFile = require('fs').openSync(args.file, 'r');
|
||||||
settings.uploadPtr = 0;
|
settings.uploadPtr = 0;
|
||||||
settings.tunnelws.send(JSON.stringify({ action: 'upload', reqid: 'up', path: require('path').dirname(args.target), name: require('path').basename(args.file), size: settings.uploadSize }));
|
settings.tunnelws.send(JSON.stringify({ action: 'upload', reqid: 'up', path: args.target, name: require('path').basename(args.file), size: settings.uploadSize }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (settings.cmd == 'download') {
|
} else if (settings.cmd == 'download') {
|
||||||
|
Loading…
Reference in New Issue
Block a user