code: function uploadFile(key, localFile) {
    var putPolicy = new qiniu.rs.PutPolicy(bucket+":"+key);
    var uptoken = putPolicy.token();
    var extra = new qiniu.io.PutExtra();
    log.i(bucket, key, localFile)
      qiniu.io.putFile(uptoken, key, localFile, extra, function(err, ret) {
        if(!err) {
          // 上传成功， 处理返回值
          //console.log(ret.hash, ret.key, ret.persistentId);       
        } else {
          // 上传失败， 处理返回代码
          console.log(err);
        }
    });
  }
docs: 构造上传函数