[xwiki-users] How to specify an attachment?

Adrian Hall ahall at mirapoint.com
Thu Jul 6 17:39:28 CEST 2006


Apologies for the non-functional digital ID.  I swear - this email stuff
will never take off.

> -----Original Message-----
> From: Adrian Hall [mailto:ahall at mirapoint.com]
> Sent: Thursday, July 06, 2006 8:50 AM
> To: 'xwiki-users at objectweb.org'
> Subject: RE: [xwiki-users] How to specify an attachment?
> 
> {attach:filename.doc} places "filename.doc" as the link name.  What I want
> to do is give it a "friendlier" name.  Many of the documents we want to
> post
> have names like:
> 
> 	2006.06.11.docid-01234567890-app8192.pdf
> 
> Which isn't friendly at all, when what we want to say is "Approved
> Contract
> (PDF)"
> 
> I'll use the <a href> version.
> 
> > -----Original Message-----
> > From: Frank Häfemeier [mailto:frank at haefemeier.net]
> > Sent: Thursday, July 06, 2006 8:28 AM
> > To: xwiki-users at objectweb.org
> > Subject: AW: [xwiki-users] How to specify an attachment?
> >
> > >I’m trying to put a link in my document that links toan attachment.  I
> > >thought it was this way:
> > >* [File 1>$xwiki.getAttachmentURL(“Main.Thispage”,“file1.pdf”]
> >
> > >But, when I actually do this (on 0.9.840), I get this link:
> >
> >
> >/xwiki/bin/edit/%2Fxwiki%2Fbin%2Fdownload%2FMain%2FThispage%2Ffile1/pdf?p
> > arent=Main.Thispage Which >doesn’t look like an attachment URL. 1)    Is
> > getAttachmentURL() just >broken, or am I mis-interpreting it’s function
> > (since there is no javadoc >for it)2)    How do I get the URL to an
> > attachment on the same page when I >want to link to it but give it a
> > different link name? Thanks, -Adrian
> >
> > On the right side of the text editor in xwiki give you some hints
> > about the syntax. To create a link to a attachment you can do
> >
> >        {image:filename.gif} inserts an image
> >        {attach:filename.doc} creates a link
> >
> > getAttachmentURL() returns the URL which you can use with the
> > <a> HTML tag directly.
> >
> > Bye
> >     Frank






More information about the users mailing list