Closed omarmyousef closed 1 year ago
The docs in https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1upload_file.html are for old TDLib v1.8.0, I think.
uploadFile
was renamed to preliminaryUploadFile
in later versions: https://github.com/tdlib/td/blob/17e120d7eced6ebcd23041124236c03ffd1db0d6/td/generate/scheme/td_api.tl#L7013
Also, one usually invokes sendMessage
directly without uploadFile
/preliminaryUploadFile
thanks for explaining i wonder if there's an updated docs for tdlib
Usually one just browses the tl file
Thanks <3
whenever i try to invoke the class "uploadFile" this error shows up:
{ _: 'error', code: 400, message: 'Failed to parse JSON object as TDLib request: Unknown class "uploadFile"' }
Class reference in the tdlib docs: https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1upload_file.html
i've tried to change tdlib version to v1.8.12 using the prebuilt versions here: https://github.com/ForNeVeR/tdlib.native/releases but that didn't fix the issue
my invoke code:
upload = await this.client.invoke({ _: 'uploadFile', file: { _: 'inputFileLocal', path: item.params.file } });
Thanks in advance and i appreciate your work guys