From version < 4.18 >
edited by Alexandru Colesnicov
on 2019/10/02 14:15
To version < 4.15 >
edited by Alexandru Colesnicov
on 2019/10/02 14:04
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -6,16 +6,22 @@
6 6   import java.io.File;
7 7   import java.net.URL;
8 8  
9 + // y=XWikiAttachment(xwiki.getDocument(doc.parent), "aFileVerified").getAttachment_content().storageFile;
10 + //y=xwiki.getDocument(doc.parent).XWikiAttachment.getAttachment_content().storageFile;
11 +
9 9   att = doc.getAttachment("TestingData.xls")
10 - println ("att: variable got its value")
11 - println ("att: Class is " + att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")")
13 + println (att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")")
12 12  
13 13   xwa = att.getAttachment()
14 - println ("xwa: variable got its value")
15 - println ("xwa: Class is " + xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")")
16 + println (xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")")
16 16  
17 17   sfi = xwa.getAttachment_content().storageFile
18 - println ("sfi: variable got its value")
19 - println ("sfi: Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")")
19 + println (sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")")
20 20  
21 + //aco = att.getAttachment_content()
22 +
23 +// for (XWikiAttachment attach in doc.getAttachmentList()) {
24 +// println "** " + attach.filename;
25 +// }
26 + //println y;
21 21  {{/groovy}}