Skip to content

Instantly share code, notes, and snippets.

@dileephell
Created February 22, 2013 08:24
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 dileephell/5011730 to your computer and use it in GitHub Desktop.
Save dileephell/5011730 to your computer and use it in GitHub Desktop.
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