Canapin
(Coin-coin le Canapin)
29.Сентябрь.2025 07:50:09
2
Привет! Вам потребуется два запроса к API. Первый — для загрузки файла, который вернёт URL, и второй — для создания поста, в который вы вставите этот URL.
Also interested in this question
I can’t find a way to upload a file to Topic and Post via the API.
Perhaps someone can suggest a method.
UPD:
I figured it out, the method is described in the documentation and it works.
Upload a file using “/uploads.json”, in response we get the Short URL of the uploaded file like “upload://ueNyWDEgHhXIuIdB472fy9T6.txt”
We update the post with the second API request, adding a line like this to the very end of post[raw]:
[filename.txt|attachment](upload://…