From f2032c80d3b830c533ab15027d6d5fc3a37f8bbd Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 18 Jan 2025 20:00:48 -0800 Subject: [PATCH] dropInEvents create extra folders from a device using FTP upload --- libs/dropInEvents.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/dropInEvents.js b/libs/dropInEvents.js index 56692ddd..c4052706 100644 --- a/libs/dropInEvents.js +++ b/libs/dropInEvents.js @@ -251,7 +251,9 @@ module.exports = function(s,config,lang,app,io){ var firstDroppedPart = pathPieces[2] var monitorEventDropDir = s.dir.dropInEvents + ke + '/' + mid + '/' var deleteKey = monitorEventDropDir + firstDroppedPart - onFileOrFolderFound(monitorEventDropDir + firstDroppedPart,deleteKey,Object.assign({},s.group[ke].rawMonitorConfigurations[mid])) + fs.mkdir(pathPieces.join('/'), { recursive: true }, (err) => { + onFileOrFolderFound(monitorEventDropDir + firstDroppedPart,deleteKey,Object.assign({},s.group[ke].rawMonitorConfigurations[mid])) + }) }) resolve({root: s.dir.dropInEvents + user.ke}) }else{