Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading file to memory stream (feature request) #442

Closed
Xaqron opened this issue Oct 16, 2017 · 5 comments
Closed

Downloading file to memory stream (feature request) #442

Xaqron opened this issue Oct 16, 2017 · 5 comments

Comments

@Xaqron
Copy link

Xaqron commented Oct 16, 2017

Currently the only available option for downloading a file from Telegram servers is downloadFile which writes file to the disk. If the file is not needed for long then (i.e. you need file for one second) a write and read from disk plus a delete should be done.
If there be a getFileStream method which returns a memory stream, then such a problem does not happen.

Thanks

@AliSawari
Copy link

AliSawari commented Oct 16, 2017

yeah, thats true, we'll need streaming , how about implementing fs methods into it?

@yagop
Copy link
Owner

yagop commented Nov 20, 2017

You can use getFileLink to get the link and create an stream with [your favourite HTTP request module].

@GochoMugo
Copy link
Collaborator

@yagop I think we can work on adding a getFileStream method. It would be quite helpful for most users I presume.

@GochoMugo
Copy link
Collaborator

Just added TelegramBot#getFileStream() on master branch. Please try it out and give us feedback.

@GochoMugo
Copy link
Collaborator

Shipped in v0.30.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants