Hello Fabio & friends,
i tried to use curl and the RESTful API to
1) create a page: ok
2) upload a file/image: ok
3) create some TAGS to the page: ????
1) and 2) is working, but 3 is not working. What is wrong in 3)?
What about unicode/Umlaut in page-name, tag-name and
upload-filename. I have some problems with öäü-German and
øæå-Norwegian.
I use Autohotkey and cURL in WindowsXP.
Thank you folks...
1)
curl.exe -v -S -u Admin:admin -X PUT -d @C:\1.xml -H
Content-Type:application/xml %Server
%/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%
1.xml:
---
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<page xmlns="http://www.xwiki.org">
<title>Hello world</title>
<content>This is a new page</content>
</page>
---
2)
curl.exe -v -S -u Admin:admin -T C:\%file% %Server
%/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%/attachments/%
file%
3)
curl.exe -v -S -u Admin:admin -X PUT -d @C:\2.xml -H
Content-Type:application/xml %Server
%/xwiki/rest/wikis/xwiki/spaces/Main/pages/%page%/tags
2.xml:
---
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<tags xmlns="http://www.xwiki.org">
<tag>TestTag</tag>
</tags>
---
--
Volker Lapczynski vl(a)LegeInfo.net
Rosendalsveien 3-B +47 - 92 62 02 48
N-1166 Oslo
www.legeinfo.net
- Norway - N59°51.573 E10°47.843