R
R
rollthebones2021-06-17 20:47:40
Bots
rollthebones, 2021-06-17 20:47:40

Can I upload a bot to Heroku that will use a txt file from a directory and an image?

I have a bot for a VKontakte conversation, which collects messages in a txt file located in a folder, and also, upon request, sends a picture from the folder to the directory with the bot. Additionally, under certain conditions, it opens txt in a directory, writes/reads and closes. Can I deploy it to keep working with files in the directory? On Heroku, I only saw a connection through git, the question is, can it somehow work with files there? If not, what service can you try to implement it on?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2021-06-18
@rollthebones

Can I deploy it to keep working with files in the directory?
This will work until Heroku restarts the bot container. And then all data will be lost.
To prevent this from happening, you need to use a DBMS add-on or other external storage, such as S3.
Or do not use Heroku, but some other hosting that does not have such features.

C
CheXnik, 2021-06-17
@CheXnik

yes, sure. But Heroku is such a hosting, it’s better to download it on AWS, there are also free virtual machines there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question