S
S
Sergey Bydanov2019-04-24 22:34:21
Bots
Sergey Bydanov, 2019-04-24 22:34:21

Is it possible to create a bot to save files?

I would like to get the following functionality: The user sends files (images, videos) to the bot, and the bot saves all the files on the local server in a folder with the user's name. I looked at the viber and whatsapp documentation and it seems that you can't do without an external server.
Or maybe it is possible without creating bots with the help of some advanced client?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
h0w4rd, 2019-04-24
@h0w4rd

If I understand the essence of the task correctly, then you need to download the file to a folder, right?
(1) I think the messenger itself provides at least some API for getting a link to a file, so it can be downloaded. (2) If the file can be downloaded, then save it too. And even if you need to go to a remote server, in any case, no one has ever canceled FTP access. (3) And since the file can be saved where necessary, then the task is solved.
About the possibility of creation, I am sure only in two messengers: Telegram and Discord. I just didn’t work with others, it might not even be possible to do this there.
PS Yes, and maybe I misunderstood the essence of the task itself, or in Viber / Whatsapp you can’t get the file URL ¯\_(ツ)_/¯

D
Draconian, 2017-03-20
@dzheka3d

Does this make the site slower? I doubt.
It is unlikely that you will have hundreds of thousands of car brands and brands in the foreseeable future, so that such requests significantly slow down. From the point of view of a relational database, there is nothing terrible here, in general, especially if the scans go by the index.
If you really want to optimize something, add better query caching, it can reduce the execution time for a part of the audience.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question