- Description:
- execute an action file uploads
- DefaultAction:
- store the uploaded file
- Preventable:
- yes
- Added:
- 2007-09-09
This event is signalled by media_upload() in inc/media.php. Use this to inspect/change/modify uploaded files.
$data contains an array which hold various informations about the uploaded file:
data[0] temporary file name (read from $_FILES)
data[1] file name of the file being uploaded
data[2] future directory id of the file being uploaded
data[3] the mime type of the file being uploaded
data[4] true if the uploaded file exists already
data[5] (since 2011-02-06) the
PHP function used to move the file to the correct location
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.