Feltöltés javítva
This commit is contained in:
parent
5b8aef3ac4
commit
844ec27281
|
|
@ -765,6 +765,9 @@ router.post('/upload/:id/:wid', function(request, response) {
|
||||||
var destDir = '/'+request.body.destPath ;//+request.files[0].filename;
|
var destDir = '/'+request.body.destPath ;//+request.files[0].filename;
|
||||||
// move the file from the temporary location to the intended location
|
// move the file from the temporary location to the intended location
|
||||||
// Könyvtár létrehozása ha nem létezik
|
// Könyvtár létrehozása ha nem létezik
|
||||||
|
if (!fs.existsSync(destDir)){
|
||||||
|
fs.mkdirSync(destDir, { recursive: true });
|
||||||
|
}
|
||||||
fs.access(destDir, function(err) {
|
fs.access(destDir, function(err) {
|
||||||
if (err && err.code === 'ENOENT') {
|
if (err && err.code === 'ENOENT') {
|
||||||
fs.mkdir(destDir);
|
fs.mkdir(destDir);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue