Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var tmp_path = req.files.uploadimgs.path,uuid;
var target_path = './upload/work/'+uuid() +'.png';
if(req.files)
{
mkdirp(newDir,0777,function(err){
if(err) throw err;
})
}
if(req.files)
{
fs.rename(tmp_path, target_path,+req.files.uploadimgs.name,function(err){
if(err) throw err;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.