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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Travis Derouin wrote:
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. [snip]
I haven't upgraded my install of MediaWiki recently, but it looks like I'll have the same problem with SpecialUploadLocal. http://www.mediawiki.org/wiki/Extension:SpecialUploadLocal
On 01/11/2007, Travis Derouin travis@wikihow.com wrote:
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.
That'd be a really nice thing for Wikimedia, by the way - I'm picturing a Commons upload form which has each of the fields in {{Information}} as a text box the uploader can optionally fill in. Or maybe other interesting things I haven't thought of yet.
- d.
wikitech-l@lists.wikimedia.org