mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added batch upload folder creation.
This commit is contained in:
parent
dd397bc156
commit
d833ac2472
5 changed files with 12 additions and 8 deletions
|
@ -1148,7 +1148,9 @@ function createMeshCore(agent) {
|
|||
if (data.pipe == true) { delete data.pipe; delete data.action; data.cmd = 'meshToolInfo'; broadcastToRegisteredApps(data); }
|
||||
break;
|
||||
case 'wget': // Server uses this command to tell the agent to download a file using HTTPS/GET and place it in a given path. This is used for one-to-many file uploads.
|
||||
sendConsoleText(JSON.stringify(data));
|
||||
if ((data.overwrite !== true) && fs.existsSync(data.path)) break; // Don't overwrite an existing file.
|
||||
if (data.createFolder) { try { fs.mkdirSync(data.folder); } catch (ex) { } } // If requested, create the local folder.
|
||||
data.url = 'http' + getServerTargetUrlEx('*/').substring(2);
|
||||
var agentFileHttpOptions = http.parseUri(data.url);
|
||||
agentFileHttpOptions.path = data.urlpath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue