I've written a few extensions that make use of UploadForm:
http://www.mediawiki.org/wiki/Extension:MultiUpload http://www.mediawiki.org/wiki/Extension:ImportFreeImages
Both of these had to hack around UploadForm because it wasn't easily extensible. Unfortunately, UploadForm has changed in version 1.11 and these extensions are largely broken. Is there any way we can create a standard function available to external callers that would upload an image, that would be consistent from version to version? Something like:
$ret = UploadForm::upload($tempname, $path, $source, $ignore_warnings)
that could return an array of warnings / errors that a caller could then either process or show to the user? Most of the functions of UploadForm are largely dependent on internal members (mUploadTempFile, mUploadTempName, etc) that are beyond the scope of an outside caller.
Or perhaps there's an easier way around this that doesn't involve UploadForm? It'd be nice if extensions didn't have to reinvent UploadForm to have the ability to upload a file.
Thanks, Travis