How to use the file-box.FileBox.fromStream function in file-box

To help you get started, we’ve selected a few file-box examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juzibot / wechaty-puppet-macpro / src / config.ts View on Github external
export function qrCodeForChatie (): FileBox {
  const name                           = 'qrcode-for-chatie.png'
  const type                           = 'png'

  const qrStream = qrImage.image(CHATIE_OFFICIAL_ACCOUNT_QRCODE, { type })
  return FileBox.fromStream(qrStream, name)
}
github wechaty / wechaty / src / config.ts View on Github external
export function qrCodeForChatie (): FileBox {
  const CHATIE_OFFICIAL_ACCOUNT_QRCODE = 'http://weixin.qq.com/r/qymXj7DEO_1ErfTs93y5'
  const name                           = 'qrcode-for-chatie.png'
  const type                           = 'png'

  const qrStream = qrImage.image(CHATIE_OFFICIAL_ACCOUNT_QRCODE, { type })
  return FileBox.fromStream(qrStream, name)
}

file-box

Pack a File into Box for easy move/transfer between servers no matter of where it is.(local path, remote url, or cloud storage)

Apache-2.0
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis