telegraph-uploader
A package that helps you to upload media files to telegra.ph.
Usage
uploadByBuffer
uploadByBuffer(buffer, contentType, [agent]) => Promise<Response>
uploadByUrl
uploadByUrl(url, [agent]) => Promise<Response>
Agent
An instance of https.Agent
class (you can use this for proxies, search https-proxy-agent
, socks5-proxy-agent
etc.)
Response
{link: String, path: String}
Examples
By buffer
const uploadByBuffer = const fs =
By URL
const uploadByUrl =