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

feat: download to writer for medias. #704

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open

Conversation

arshamalh
Copy link

In case of (b *Bot) Download(file *File, localFilename string) error function, users may need different actions than just saving the file automatically on disk, e.g.

  • storing the file on minio, s3, etc.
  • piping the file to a request to another service
  • piping the file to an AI model
  • making the file on the disk however the user wants.

Having another DownloadToWriter method that accepts any kind of io.Writer will help users skip an extra step to save on disk and read from the disk.

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

Successfully merging this pull request may close these issues.

1 participant