Release status: experimental
|Description||Runs a utility against files uploaded that match a user-provided filter. Used (for instance) to convert bad image formats to better formats.|
|Latest version||0.1.1-beta (Aug 26 2012)|
|License||GNU General Public License 2.0|
|Translate the UploadConvert extension if it is available at translatewiki.net|
|Check usage and version matrix.|
The UploadConvert extension allows you to execute a program when uploading a file, possibly changing the file or renaming it in the process. The original thrust of this extension was to provide a mechanism to avoid manually converting BMP images into PNG for upload.
It's possible to use UploadConvert for other utilities. For instance, you may wish to run an image optimizer on your PNG files (such as optipng) or validate a ZIP file's integrity (unzip -t). UploadConvert by default checks the return code from the executed command to determine success and can be configured to refuse an upload which fails to "convert".
The title of the extension is, admittedly, mostly search engine bait. Your author was unable to find any existing extension that would convert images on upload and hopes that this extension is easy to find for those that wish to do so.
You may download a zip or a tarball straight from github at the link on the right. The GitHub repo page also includes version history, including historical versions as downloads. The only important file is (of course) UploadConvert.php.
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php:
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
This extension was based, in part, on UploadPDF.