- Description:
- manipulate media file downloads from the wiki
- DefaultAction:
- send the file to the user's browser
- Preventable:
- yes
- Added:
- 2008-06-23
This event wraps around the sendFile() function in lib/exe/fetch.php. Can be used to intercept or modify downloaded files and images.
$data['file'] – The filename of the file about to be delivered, can be modified by your plugin
$data['mime'] – The Mime-Type of the file, can be modified by your plugin
$data['cache'] – The wanted cache behavior (-1 = cache forever, 0 = never cache, >0 cache time in seconds), can be modified by your plugin
$data['orig'] – Images only: filename before resizing
$data['ext'] – Extension of the file
$data['width'] – Images only: the wanted width as specified in the request
$data['height'] – Images only: the wanted height as specified in the request
The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.