Wiki source code of !Test_file_path
Version 4.16 by Alexandru Colesnicov on 2019/10/02 14:10
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{groovy}} | ||
| 2 | import com.xpn.xwiki.*; | ||
| 3 | import com.xpn.xwiki.api.*; | ||
| 4 | import com.xpn.xwiki.doc.*; | ||
| 5 | import org.apache.commons.io.FileUtils; | ||
| 6 | import java.io.File; | ||
| 7 | import java.net.URL; | ||
| 8 | |||
| 9 | att = doc.getAttachment("TestingData.xls") | ||
| 10 | println ("att variable got its value") | ||
| 11 | println ("att Class is " + att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")") | ||
| 12 | |||
| 13 | xwa = att.getAttachment() | ||
| 14 | println ("xwa variable got its value") | ||
| 15 | println ("xwa Class is " + xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")") | ||
| 16 | |||
| 17 | sfi = xwa.getAttachment_content().storageFile | ||
| 18 | println ("sfi variable got its value") | ||
| 19 | println ("sfi Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")") | ||
| 20 | |||
| 21 | {{/groovy}} |