I installed mkdirp to create new folder when the folder is not existed.
(Using npm install -g mkdirp)
But it seems like the mkdirp doesn't have the permission to create new folder,
when I try, I got this error,
{ [Error: EACCES, mkdir '/upload'] errno: 3, code: 'EACCES', path: '/upload' }
This is my code, and I'm using MAC
'fileUpload' : function(req, res, next){
var mkdirp = require('mkdirp');
mkdirp('/upload/image', function (err) {
if (err) console.error(err)
console.log ('!');
});
How can I give the permisson to mkdirp to create new folder?
Aucun commentaire:
Enregistrer un commentaire