Hello

I put a file Text.txt as attachment in a page: Sandbox.Page1
I in an other page Sandbox.Page2, I write the following script:
{{groovy}}
def mydoc=xwiki.getDocument('Sandbox.Page1')
def myfile=mydoc.getAttachment('Text.txt')
println "|"+mydoc+"|"+myfile
{{/goovy}}
The result is
|Sandbox.Page1|null

If I put the same script in Sandbox.Page2, the result become:
|Sandbox.Page1|com.xpn.xwiki.api.attachm...@331be8

Why cannot get attachments from other document?

I run XWiki 2.5 with Tomcat 6.0.28, Mysql 5.1.49, Ubuntu 10.10

Arnaud.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to