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

The reason of Something went wrong when upload #38

Open
sealter opened this issue Oct 24, 2024 · 0 comments
Open

The reason of Something went wrong when upload #38

sealter opened this issue Oct 24, 2024 · 0 comments

Comments

@sealter
Copy link

sealter commented Oct 24, 2024

I found many people said something went wrong when upload files, I tried, Yes.

And I check the source and debug upload function to telegram, telegram's response is: "chat not found".

It is becase chat_id. the wiki in https://github.com/Dominux/Pentaract/wiki/Creating-storages , the picture has no 100 before chat_id, and now it has!
when we register storage, we should not include 100.

you add 100 in code:

      let chat_id = {
            // inserting 100 between minus sign and chat id
            // cause telegram devs are complete retards and it works this way only
            //
            // https://stackoverflow.com/a/65965402/12255756

            let n = chat_id.abs().checked_ilog10().unwrap_or(0) + 1;
            chat_id - (100 * ChatId::from(10).pow(n))
        };

so if we copy chat_id from web.telegram.org, It already has 100, and there will be 100 twice when send document to telegram.

I test there are some other problem, like greater 20M file, if one chunk fail, other chunks will upload to telegram successfully, the failed one's reason is unknown, the log give me "unknown error".

If upload failed, the storages's query is empty, so in ui the page is no storages.


the project is good, There are many things to learn, but I test it , it cannot use in production or personal.

Thank you, good work. I will give you a star.

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