Skip to content

Instantly share code, notes, and snippets.

Created Jun 7, 2012
What would you like to do?
upload'/', function(req, res){
var temp_path = req.files.uploadfile.path;
var save_path = './public/images/' +;
fs.rename(temp_path, save_path, function(error){
if(error) throw error;
fs.unlink(temp_path, function(){
if(error) throw error;
res.send("File uploaded to: " + save_path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment