devel:event:media_upload_finish
Table of Contents
MEDIA_UPLOAD_FINISH
- Description:
- execute an action on 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.
Passed Data
$data contains an array which hold various informations about the uploaded file:
- data[0] path/to/new/media.file (normally read from $_FILES, potentially could come from elsewhere)
- 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
Note
This event is used when adding/replacing media files and is designed to be independent of the mechanism used to transfer the media file to the wiki server. Currently, within standard DokuWiki, this only happens by browser upload - however it should not be assumed this will always be the case.
See also
- Code related to this event used in any DokuWiki's files, plugins and templates
devel/event/media_upload_finish.txt · Last modified: by torpedo