Adding attachment to a wiki page programatically

31 views
Skip to first unread message

Ozgur Polat

unread,
Sep 2, 2020, 5:55:32 AM9/2/20
to Trac Development
Hi, 

I want to attach a docx file as well as image files to a wiki page programatically but could not find any example code doing this. I found 


sounds like the right place to start but I was wondering if anyone has done this and if you could give me some example code.

Thank you in advance.


RjOllos

unread,
Sep 2, 2020, 1:08:48 PM9/2/20
to Trac Development
From the command line it can be done using trac-admin:

You could use XmlRpcPlugin to remotely add:
Note that the plulgin is not yet compatible with Trac 1.4.

From plugin code you insert an attachment using the Attachment class:

- Ryan 

Ozgur Polat

unread,
Sep 4, 2020, 2:12:26 PM9/4/20
to Trac Development
Thanks Ryan
Reply all
Reply to author
Forward
0 new messages