Upload form changes

This is a proposal and does not work.

See also brion's post on this.

  • Move upload logics out of UploadForm: This will allow the API and extensions to easily upload files.
  • Multiple customizable upload forms via Special:Upload/ownwork, etc.

Upload class

edit
  • Abstract upload baseclass
    • Subclass UploadFromUpload
    • Subclass UploadFromLink
    • Subclass UploadFromImport (cross wiki import)

Flow

edit

SpecialUpload => new UploadForm => new UploadFromUpload => RepoGroup::singleton()->getLocalRepo()->findFile()->upload()

Customizable form

edit

Special:Upload/ownwork will get its data via MediaWiki:Upload-ownwork. Example file:

* label|filename
* file|
* label|author
* text|author
* label|license
* selectbox|licenses
* label|description
* textbox|description

Will create a form with a file input box an author input box and a license selector. The label will be fetched from [[MediaWiki:Upload-ownwork-<label name>/langcode]]. Similarly the license select box will be constructed. Then after upload all this will be transformed using MediaWiki:Upload-ownwork-template which uses {{{template parameters}}} to transform this into something nice:

{{Information
|Description={{{description}}}
|Author={{{author}}}
|Permission={{{{{license}}}}}
}}

Modify the text below the upload form

edit

Edit MediaWiki:Uploadtext

Other stuff

edit