A
A
Artem Melnykov2020-08-24 10:12:54
Node.js
Artem Melnykov, 2020-08-24 10:12:54

How to convert to JS?

Hello.

I found this code in Python on the Internet:

upload_url = vk.method("docs.getMessagesUploadServer", {"type": "audio_message", "peer_id": id, "v": "5.103"})['upload_url']

request = requests.post(upload_url, files={'file': open(filePath, 'rb')}).json()


And I have this question: How to do this in JS (Exactly 2 lines of code, 1 I have already done)?

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question