Table of Contents

Linked Attachments from YouTube, Flickr, and others

Author: Victor Boctor


Mantis supports attaching files to issues and projects. Mantis also supports auto-preview for image attachments and there are patches to make it auto-preview flag files as well. This feature allows Mantis to support linked as attachments. This is where a user attaches a link rather than an actual file. The link should be auto-previewed if it is pointing to a recognized format. This is similar to what Wikis do with hyper links to images where they auto-embed the image on the page. The recognized formats should include:

The process of converting a link to an embedded object or tags should be done using a custom function. This allows Mantis admins to override such function to support their own formats. They can also easily contribute it to Mantis. Some of these handles will just check the extension of the file at the end of the URL and others will recognize a URL to a certain website like YouTube.


Storage in the Database


Will be replaced with:

<object width="425" height="350">
  <param name="movie" value=""></param>
  <param name="wmode" value="transparent"></param>
  <embed src="" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>