Skip to content

Instantly share code, notes, and snippets.

@muZk
Last active December 12, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muZk/4773344 to your computer and use it in GitHub Desktop.
Save muZk/4773344 to your computer and use it in GitHub Desktop.
function createDirectory(directory,callback){
mkpath(directory,function(err){
callback(null)
});
}
exports.album_create = function(req,res){
var album_path = "uploads/albums/"+req.body.name
var directories = [ album_path, album_path+"/pages", album_path+"/laminas", album_path+"/sobres" ];
async.eachSeries(directories,createDirectory, function(err){
res.redirect('/admin/album');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment