Jeroen, On 3/16/2010 11:34 AM, Jeroen Baten wrote:
Yes, but what if you want to link to an existing attachment on another page and you don't know the title of that other page.
So: 1-ask system list of all attachments with pages where there exist
You mean searching all pages containing attachments or a certain attachment? You could try the search method, though I'm not sure it supports all hql queries. The xml result will be quite big on a large wiki. If not, there's always the force brute way: getSpaces -> getPages -> getAttachments
2-link to attachment on other page.
I'm not sure I understand your use case. The url is still the same if you don't want to translate it into a xwiki syntax url.
Willing to contribute when I know what to write :-)
any thoughts on why getPageHistory exists in java class but doesn't work in python? Or is xwiki intelligent enough to prevent calls to yet undocumented classes? :-)
Not sure why the call fails. We need more details on this. Florin Ciubotaru
kind regards,
On Tue, 2010-03-16 at 11:10 +0200, Florin Ciubotaru wrote:
Hi,
On 3/16/2010 9:38 AM, Jeroen Baten wrote:
Hello,
When I use the XMLRPC interface from Python I can store a lot of pages, attachments and even convert syntaxes.
But how can I find if some attachment already exists in the wiki to make a link to that attachment and not upload the same attachment over and over again?
Add attachment doesn't have the optional check version as storePage has. I think the only way to do that right now is to get the list of attachments of a page before you start the upload. For that you can use the Attachment[] getAttachments(..) method. The Attachment map contains an 'url' key.
You can check the xml-rpc api& model at: - http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-xmlrpc/xwiki-xm... For a more complete model and documented api please check: - http://svn.xwiki.org/svnroot/xwiki/xoffice/trunk/xword/Connectivity/Clients/...
We have some missing elements in our xml-rpc documentation on xwiki.org, is this something you could contribute?
Thanks, Florin Ciubotaru
kind regards,
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users