40 $upload = $request->getUpload(
'wpUploadFile' );
41 $desiredDestName = $request->getText(
'wpDestFile' );
42 if ( !$desiredDestName ) {
43 $desiredDestName = $upload->getName();
47 $this->
initialize( $desiredDestName, $upload );
56 $this->mUpload = $webRequestUpload;
58 $this->mUpload->getTempName(), $this->mUpload->getSize() );
66 # Allow all requests, even if no file is present, so that an error
67 # because a post_max_size or upload_max_filesize overflow
82 # Check for a post_max_size or upload_max_size overflow, so that a
83 # proper error can be shown to the user
84 if ( $this->mTempPath ===
null || $this->
isEmptyFile() ) {
85 if ( $this->mUpload->isIniSizeOverflow() ) {
90 self::getMaxPhpUploadSize()
96 return parent::verifyUpload();
UploadBase and subclasses are the backend of MediaWiki's file uploads.
isEmptyFile()
Return true if the file is empty.
initializePathInfo( $name, $tempPath, $fileSize, $removeTempFile=false)
Implements regular file uploads.
initialize( $name, $webRequestUpload)
Initialize from a filename and a WebRequestUpload.
static isValidRequest( $request)
WebRequestUpload $mUpload
initializeFromRequest(&$request)
Object to access the $_FILES array.