formidable上传图片

function uploadfiles(res, req){
var form = new formidable.IncomingForm();
form.parse(req,function(error, fields, files){
var types = files.upload.name.split('.');
var date = new Date();
var ms = Date.parse(date);
fs.renameSync(files.upload.path,"/tmp/files"+ ms +"."+String(types[types.length-1]));
});
}

http://www.tuicool.com/articles/F7JrMjj

上一篇:c#图像灰度化、灰度反转、二值化


下一篇:2.java.lang.NullPointerException(空指针异常)