Canapin
(Coin-coin le Canapin)
29. September 2025 um 07:50
2
Hallo, Sie benötigen zwei API-Anfragen. Eine zum Hochladen der Datei, die die URL zurückgibt, und eine zum Erstellen des Beitrags, in den Sie die URL einfügen.
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://…