tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Creating an instance of inputFile #3027

Closed jonnjonnjo closed 2 months ago

jonnjonnjo commented 2 months ago

I'm using java springboot and use multiPartFile for handling the files. I want to create an instance of inputFile, but figured out that there's no function or method that could create an instance of inputFile given a multipartFile. There's also no subclasses that could handle that. what should i do? should i just create the instance of my file into a local directory, take the directory address, and create an instance of inputFileLocal using that path?

levlam commented 2 months ago

multiPartFile documentation says "In either case, the user is responsible for copying file contents to a session-level or persistent store as and if desired. The temporary storage will be cleared at the end of request processing." Hence, the simplest way is to save the file locally and then use inputFilleLocal as you said.

jonnjonnjo commented 2 months ago

okay thanks !