+ if ( $this->mParams['chunk'] ) {
+ $maxSize = UploadBase::getMaxUploadSize();
+ if ( $this->mParams['filesize'] > $maxSize ) {
+ $this->dieWithError( 'file-too-large' );
+ }
+ if ( !$this->mUpload->getTitle() ) {
+ $this->dieWithError( 'illegal-filename' );
+ }
+ } elseif ( $this->mParams['async'] && $this->mParams['filekey'] ) {
+ // defer verification to background process
+ } else {
+ wfDebug( __METHOD__ . " about to verify\n" );
+ $this->verifyUpload();
+ }