I want to creat directory if not exist and then save the file that I got from Front-end
This is my code and it only does the part of creating folders, but my main problem is saving the file in this path
let directory = await './some-dir/'+d.getFullYear()+'/'+("0" + (d.getMonth() + 1)).slice(-2)+'/'+(d.getDay().toString().padStart(2, "0"))+'/'+d.getHours()+'/'+d.getMinutes()+'/'+d.getSeconds()
fs.mkdirSync(directory, { recursive: true })