Get for an attachment real full path at filesystem

For example, I have an attachment to xwiki page. How is possible to get (via velocity or groove script at this page) real full path for this attachment at filesystem?
Thanks beforehand!

There is no public API to do that but if it’s a short term need you can use one of the following :

  • the component and method getAttachmentDir

  • using Groovy (which does not care about public/private), access the private field storageFile from the attachment content instance (given by XWikiAttachment#getAttachment_content())

Thanks! That is what I need! I will try to use.

Finally I got it!

Need to write (groovy):
rzlt = doc.getAttachment("TestingData.xls").getAttachment().getAttachment_content().storageFile.getAbsolutePath()

I added snippet at

Thanks ! I added a warning.