Canapin
(Coin-coin le Canapin)
Setembro 29, 2025, 7:50am
2
Olá, você precisa de duas requisições de API. Uma para fazer o upload do arquivo, que retorna a URL, e outra para criar o post na qual você insere a 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://…