Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
I am using telegram bot api using POST method. I am stuck at uploading group media

In the section of telegram InputMediaDocument I am not getting how can I upload file using multipart? At what palce should I place the blob of my file? The parameters go as follows:

type:String,
media:String,
thunb:Input File/String,
.
.
.

and so on... How can I upload my file at media as String? In the description it says Pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. What is the meaning of <file_attach_name>?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Update: I found out that it was very easy! Structurize your data as:

  const data = [
    {type':document,'media':'attach://file1'},
    {type:'document',media:'attach://file2',caption:"This is file 2"},
    {type:'jpg',media:'attach://photo',caption:"This is a photo"},
    {type:'video',media:'attach://video',caption:"This is a Video"}
  ];
  const postData = {
    method: "sendMediaGroup",
    chat_id: String(chat_id),
    media: JSON.stringify(data),
    file1:blob,
    file2:blob1,
    photo:blob3,
    video:blob4
  }

Try this and you'll get the results!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!