td
td copied to clipboard
File generation without uploading a file
Currently, only option to start file generation is to either send InputFileGenerated
through one of InputMessageContent
types, or by passing it to the UploadFile
method.
However, in some cases, there's need to generate files without uploading it anywhere (but to use later by TDLib).
Example: Media type is not known before file generation. Having an option to generate file without upload would allow to generate file, see what's inside, determine correct InputMessageContent
, and only then send it.
You can use uploadFile
with file_type
set to fileTypeUnknown
to achieve exactly this behavior.
It seems that the real problem is the necessity to edit additional information about a file like duration or waveform before the message is actually sent, but after the file is generated. Now it is possible only to use uploadFile
to generate the file and send it after that, but in that case there will be no message in the chat before the file is actually generated.