Opened 8 years ago

Closed 7 years ago

#4937 closed enhancement (fixed)

Allow linking to all Trac attachments for swf=<source>

Reported by: ogiesen Owned by: rudyryk
Priority: normal Component: FlashEmbedMacro
Severity: normal Keywords: flash attachment
Cc: ogiesen Trac Release: 0.11


It would be great if I could easily embed SWF videos that are attached to a ticket or wiki page rather than using the full http-link to the raw attachment.


  • [[Embed(attachment=tutorial.swf)]]
  • [[Embed(attachment=ticket:123:video.swf)]]
  • [[Embed(attachment=wiki:SomePage:movie.swf)]]

Alternatively allow attachment:-links for the swf-source, e.g.:

  • [[Embed(swf=attachment:tutorial.swf)]]
  • [[Embed(swf=attachment:ticket:123:video.swf)]]
  • [[Embed(swf=attachment:wiki:SomePage:movie.swf)]]

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by rudyryk

  • Resolution set to fixed
  • Status changed from new to closed

Thank you for the feedback! The feature is implemented in r5614. Watch examples at FlashEmbedMacro.

comment:2 follow-up: Changed 8 years ago by ogiesen

Thanks for looking into this! :)

However, ...
Sorry, doesn't work for me. The URL that gets generated is not valid on my system (trac 0.11.3).

Let's say my environment root is at /trac/myEnv and I'm trying to embed an attachment movie.swf that belongs to a wiki page named SomePage. The macro currently generates the following URL:


where AFAICT it should be:


I noticed that for instance the built-in [[Image()]] macro appears to use a utility function named get_resource_url() to expand the attachment link (e.g. here). Would that help, maybe?

comment:3 in reply to: ↑ 2 Changed 8 years ago by rudyryk

  • Keywords flash attachment added
  • Resolution fixed deleted
  • Status changed from closed to reopened

I see. Of course, this need to be fixed. Copy-paste complex code from Image-macro source seems a bit ugly, so some research and refactoring may need.

Thank you for detailed report! :)

comment:4 Changed 7 years ago by rjollos

  • Summary changed from allow linking to trac attachments for swf= source to Allow linking to all Trac attachments for swf=<source>

I'm seeing this same issue.

Also, the third example for using the attachment prefix syntax seems incorrect. It is shown as:


However, I don't even think that is a valid TracLinks syntax. The example should probably be:


which is the form of attachment linking that currently does not work for me.

comment:5 Changed 7 years ago by rudyryk

  • Resolution set to fixed
  • Status changed from reopened to closed

attachments for current page should work since r7800


Add Comment

Modify Ticket

as closed The owner will remain rudyryk.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.