opex-telefile

1.0.0 • Public • Published

telefile

Uploading media files to telegra.ph

Install

npm i opex-telefile

Usage

Always returns promise with link to media file like https://telegra.ph/file/hash.jpg

Common

NOTE: Just specify the file name

const link = await telefile('cat.jpg')
console.log(link)

Custom

Specify other type of source via object

file name

telefile({ source: 'kitten.jpg' })

url

telefile({ url: 'https://placekitten.com/300/200' })

stream

telefile({ stream: fs.createReadStream('kitten.jpg') })

Package Sidebar

Install

npm i opex-telefile

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

11.5 kB

Total Files

11

Last publish

Collaborators

  • oreh-orehov