mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Partial fix for #2772.
This commit is contained in:
parent
4d9d3fb611
commit
8668a4449c
@ -5099,7 +5099,7 @@
|
||||
x += '<input type=file name=files id=d2uploadinput style=width:100% multiple=multiple onchange="d2batchUploadValidate()" /><br /><br />';
|
||||
if (wintype) { x += addHtmlValue("Windows Path", '<input style=width:250px type=text onchange="d2batchUploadValidate()" onkeyup="d2batchUploadValidate()" name=winpath id=d2winuploadpath placeholder="C:\\temp" value="" />'); }
|
||||
if (linuxtype) { x += addHtmlValue("Linux Path", '<input style=width:250px type=text onchange="d2batchUploadValidate()" onkeyup="d2batchUploadValidate()" name=linuxpath id=d2linuxuploadpath placeholder="/tmp" value="" />'); }
|
||||
x += '<br /><label><input type=checkbox name=createFolder />' + "Create folder if it does not exists?" + '</label></form>';
|
||||
x += '<br /><label><input type=checkbox name=createFolder />' + "Create folder if it does not exists?" + '</label><br />';
|
||||
x += '<label><input type=checkbox name=overwriteFiles />' + "Overwrite if file exists?" + '</label></form>';
|
||||
setDialogMode(2, "Batch File Upload", 3, d2batchUploadValidateOk, x);
|
||||
d2batchUploadValidate();
|
||||
|
@ -3745,7 +3745,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
|
||||
// Get fields
|
||||
if ((fields == null) || (fields.nodeIds == null) || (fields.nodeIds.length != 1)) { res.sendStatus(404); return; }
|
||||
var cmd = { nodeids: fields.nodeIds[0].split(','), files: [], user: user, domain: domain };
|
||||
var cmd = { nodeids: fields.nodeIds[0].split(','), files: [], user: user, domain: domain, overwrite: false, createFolder: false };
|
||||
if ((fields.winpath != null) && (fields.winpath.length == 1)) { cmd.windowsPath = fields.winpath[0]; }
|
||||
if ((fields.linuxpath != null) && (fields.linuxpath.length == 1)) { cmd.linuxPath = fields.linuxpath[0]; }
|
||||
if ((fields.overwriteFiles != null) && (fields.overwriteFiles.length == 1) && (fields.overwriteFiles[0] == 'on')) { cmd.overwrite = true; }
|
||||
|
Loading…
Reference in New Issue
Block a user