You could just link to the not-yet existing attachment when creating the ticket and then attach it.
But ff your really want to do it like you said, I would need to code a link formatter plug-in. IMHO a macro ala [[Attachment(1)]] would be easier here. Do you want to always link to the first (or n-th) attachment even if it changes, i.e. the original one gets deleted and the second one becomes the first one, or a new one is attached, or should it only link to the original one and become dangling if that attachment gets deleted? In the second case a macro must substitute itself by changing the Trac DB entry of the wiki or ticket. This would then really be a "dirty hack". Martin On Nov 11, 11:12 am, wackazong <[EMAIL PROTECTED]> wrote: > Hi! > > I would like to know whether it would be possible to do the following: > > 1) Create a ticket > 2) Attach a file with the name "somedatasheet.pdf" > 3) In the description of the ticket, use Wiki Code like this > > [[raw-attachment:$FIRSTATTACHMENTNAME]] > > Where $FIRSTATTACHMENTNAME is then automatically replaced with the > filename of the first attachment, so that when I look at the > description after rendering, I get a link that takes me to the file. > > Would be great! But I can imagine that it requires some python. Dirty > hacks welcome! :) > > ALEXander. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
