function uploadS3WithStream(buckeName, fileName) {
  log.trace({ buckeName, fileName }, `uploadS3WithStream starts`);
  return new Promise((resolve, reject) => {
    const fileKey = getS3FileKey(fileName);
    const rs = fs.createReadStream(fileName);
    const pass = new PassThrough();
    rs.pipe(pass);

    const params = { Bucket: buckeName, Key: fileKey, Body: pass };
    s3.upload(params, (err, data) => {
      if (err) reject(err);
      log.trace({ err, data }, `uploadS3WithStream has uploaded`);
      resolve(true);
    });
  });
}
/** uploadS3WithStream upload file to S3 with Stream
 * @param buckeName: String.
 * @param fileName: String. Absolute file Path
 * @return Promise<Boolean>
 */
uploadS3WithStream upload file to S3 with Stream
@param buckeName: String.
@param fileName: String. Absolute file Path
@return Promise
uploadS3WithStream upload file to S3 with Stream @param buckeName : String . @param fileName : String . Absolute file Path @return Promise
function uploadS3WithStream(buckeName, fileName) {
  log.trace({ buckeName, fileName }, `uploadS3WithStream starts`);
  return new Promise((resolve, reject) => {
    const fileKey = getS3FileKey(fileName);
    const rs = fs.createReadStream(fileName);
    const pass = new PassThrough();
    rs.pipe(pass);
    const params = { Bucket: buckeName, Key: fileKey, Body: pass };
    s3.upload(params, (err, data) => {
      if (err) reject(err);
      log.trace({ err, data }, `uploadS3WithStream has uploaded`);
      resolve(true);
    });
  });
}
function uploadS3WithStream ( buckeName , fileName ) { log . trace ( { buckeName , fileName } , ` ` ) ; return new Promise ( ( resolve , reject ) => { const fileKey = getS3FileKey ( fileName ) ; const rs = fs . createReadStream ( fileName ) ; const pass = new PassThrough ( ) ; rs . pipe ( pass ) ; const params = { Bucket : buckeName , Key : fileKey , Body : pass } ; s3 . upload ( params , ( err , data ) => { if ( err ) reject ( err ) ; log . trace ( { err , data } , ` ` ) ; resolve ( true ) ; } ) ; } ) ; }
uploadS3WithStream upload file to S3 with Stream
 @param buckeName: String.
uploadS3WithStream upload file to S3 with Stream @param buckeName : String .