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

iterDownload terrible documentation #754

Open
Buffon-tries opened this issue Nov 29, 2024 · 0 comments
Open

iterDownload terrible documentation #754

Buffon-tries opened this issue Nov 29, 2024 · 0 comments

Comments

@Buffon-tries
Copy link

Buffon-tries commented Nov 29, 2024

Hello everyone, I wanted to use iterDownload to stream download files. but when I wanted to use iterDownload, I initially copied the code give in the docs but:

  • the code had syntax errors
  • the code does not explain anything. for example what if I want to use a video instead of a photo? what does size mean? it's not defined, where do I get it from? how do I know what to set the offset as? what about the limit?

btw this is what I'm referring to:

for await (const chunk of client.iterDownload({
      file: new Api.InputPhotoFileLocation({
         id: photo.id,
         accessHash: photo.accessHash,
         fileReference: photo.fileReference,
         thumbSize: size.type
     }),
     offset: start,
     limit: end,
     requestSize:2048*1024
)){
    console.log("Downloaded chunk of size",chunk.length);
};
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

No branches or pull requests

1 participant