The verification is broken with chunken uploads and ultimately
cause large files to no more be uploadable.
This reverts commit
38ec6d8a344d4eda0307dd3a72653dd2171305d6.
Bug: T223448
Change-Id: If414a8f751a3e1488a2ab099abd8b598c973c1f4
}
// Check if the uploaded file is sane
}
// Check if the uploaded file is sane
- wfDebug( __METHOD__ . " about to verify\n" );
- $this->verifyUpload();
+ 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();
+ }
// Check if the user has the rights to modify or overwrite the requested title
// (This check is irrelevant if stashing is already requested, since the errors
// Check if the user has the rights to modify or overwrite the requested title
// (This check is irrelevant if stashing is already requested, since the errors