Groups
Sign in
Groups
Trac Development
Conversations
About
Send feedback
Help
Adding attachment to a wiki page programatically
35 views
Skip to first unread message
Ozgur Polat
unread,
Sep 2, 2020, 5:55:32 AM
9/2/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
https://trac.edgewall.org//wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.IAttachmentManipulator
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 PM
9/2/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Trac Development
From the command line it can be done using trac-admin:
https://trac.edgewall.org/wiki/TracAdmin#FullCommandReference
You could use XmlRpcPlugin to remotely add:
https://trac-hacks.org/wiki/XmlRpcPlugin
Note that the plulgin is not yet compatible with Trac 1.4.
From plugin code you insert an attachment using the Attachment class:
https://www.edgewall.org/docs/branches-1.4-stable/html/api/trac_attachment.html#trac.attachment.Attachment
- Ryan
Ozgur Polat
unread,
Sep 4, 2020, 2:12:26 PM
9/4/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Trac Development
Thanks Ryan
Reply all
Reply to author
Forward
0 new messages