Answer the question
In order to leave comments, you need to log in
How to upload photos from an album as a document through vk api?
I want photos from the album to be sent in messages as a document (in the attachment field there was doc and not photo). I can't figure out how to do it. So far I have done this: the photos are in a separate directory near the bot, the bot first uploads the photo to the server, takes its ID and, using the newly received photo ID, sends it as a document to the user. But in this way, each time another photo is uploaded to the group. How to do it normally?
Answer the question
In order to leave comments, you need to log in
You do not understand the work of attaching VKontakte. In order to send a photo and a document, they must be uploaded separately. The photo is compressed, but the document is not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question