On 3/17/06, Mark Robinson <mark.robinson(a)hk.tntfreight.com> wrote:
Hi Emil.
Yes.
The simplest way is a html tag. The attachment URL is effectively
the name of a file in a subfolder of the name of the page with an
action of "download".
eg
http://www.example.com:8180/xwiki/bin/download/MyWeb/MyPage/
MyAttachment.xml
You could wrap the page and filename in a VelociMacro if you wanted
to make it a bit portable for future use.
Thanks Mark
the best way i think is is to do :
#set ($attDoc = $xwiki.getDocument("Main.Files"))
#set ($urlAtt = $attDoc.getAttachmentURL("File.xml"))
[My Attachment>$urlAtt]
you can do a velocity macro with it to simplify the use.
like this, if the urlFactory change, or you move your wiki to a
portail (xwiki is JSR168),your link will always work.
Jérémi
--
Blog:
http://www.jeremi.info
LinkedIn:
https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki:
http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com