From version < 2.1 >
edited by etvc developer
on 2019/09/30 10:45
To version < 4.21 >
edited by Alexandru Colesnicov
on 2019/10/02 14:26
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.etvc
1 +XWiki.acolesnicov
Content
... ... @@ -6,14 +6,24 @@
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 -// y = "Execution of python script failed: ";
12 -
13 - doc.XWikiAttachment.getAttachment_content().storageFile;
14 -
15 -// for (XWikiAttachment attach in doc.getAttachmentList()) {
16 -// println "** " + attach.filename;
17 -// }
18 - //println y;
9 + att = doc.getAttachment("TestingData.xls")
10 + println ("att = doc.getAttachment(\"TestingData.xls\")")
11 + println (" att: variable got its value")
12 + println (" att: Class is " + att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")")
13 +
14 + xwa = att.getAttachment()
15 + println ("xwa = att.getAttachment()")
16 + println (" xwa: variable got its value")
17 + println (" xwa: Class is " + xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")")
18 +
19 + sfi = xwa.getAttachment_content().storageFile
20 + println ("sfi = xwa.getAttachment_content().storageFile")
21 + println (" sfi: variable got its value")
22 + println (" sfi: Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")")
23 +
24 + apa = sfi.getAbsolutePath()
25 + println ("apa = sfi.getAbsolutePath()")
26 + println (" apa: variable got its value = " + apa)
27 + println (" apa: Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")")
28 +
19 19  {{/groovy}}