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

相关文章:

  • 2022-03-03
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-01-01
  • 2021-08-12
  • 2022-01-08
相关资源
相似解决方案