standalone/build-upyun-receiver-stream.js
function uploadToUpyun(path, file, __newFile, done) {
  var options = this.options;
  var upyun = getInstance(options);
  upyun.uploadFile(path, file, __newFile.headers['content-type'], true, function (err, data) {
    if (err) {
      return done(err);
    }
    if (!data) {
      return done(new Error('Upload failed!'));
    }
    if (data && data.statusCode != 200) {
      return done(new Error(data.error['message']));
    }
    __newFile.fd = options.domain + path;
    return done();
  });
}
function uploadToUpyun(path, file, __newFile, done) {
  var options = this.options;
  var upyun = getInstance(options);
  upyun.uploadFile(path, file, __newFile.headers['content-type'], true, function (err, data) {
    if (err) {
      return done(err);
    }
    if (!data) {
      return done(new Error('Upload failed!'));
    }
    if (data && data.statusCode != 200) {
      return done(new Error(data.error['message']));
    }
    __newFile.fd = options.domain + path;
    return done();
  });
}
function uploadToUpyun ( path , file , __newFile , done ) { var options = this . options ; var upyun = getInstance ( options ) ; upyun . uploadFile ( path , file , __newFile . headers [ 'content-type' ] , true , function ( err , data ) { if ( err ) { return done ( err ) ; } if ( ! data ) { return done ( new Error ( 'Upload failed!' ) ) ; } if ( data && data . statusCode != 200 ) { return done ( new Error ( data . error [ 'message' ] ) ) ; } __newFile . fd = options . domain + path ; return done ( ) ; } ) ; }
Upload the file to remote service of upyun
@param  {} path
@param  {} file
@param  {} __newFile
@param  {} done
Upload the file to remote service of upyun