|
MediaWiki master
|
UploadBase and subclasses are the backend of MediaWiki's file uploads. More...
Inherited by MediaWiki\Upload\UploadFromFile, MediaWiki\Upload\UploadFromStash, and MediaWiki\Upload\UploadFromUrl.

Public Member Functions | |
| __construct () | |
| authorizeUpload (Authority $performer) | |
| Check whether the user can upload the image. | |
| canFetchFile () | |
| Perform checks to see if the file can be fetched. | |
| checkWarnings ( $user=null) | |
| Check for non fatal problems with the file. | |
| cleanupTempFile () | |
| If we've modified the upload file, then we need to manually remove it on exit to clean up. | |
| convertVerifyErrorToStatus (array $error) | |
| fetchFile () | |
| Fetch the file. | |
| getDesiredDestName () | |
| Get the desired destination name. | |
| getFileSize () | |
| Return the file size. | |
| getImageInfo ( $result=null) | |
| Gets image info about the file just uploaded. | |
| getLocalFile () | |
| Return the local file and initializes if necessary. | |
| getRealPath ( $srcPath) | |
| getSourceType () | |
| Returns the upload type. | |
| getStashFile () | |
| getTempFileSha1Base36 () | |
| Get the base 36 SHA1 of the file. | |
| getTempPath () | |
| getTitle () | |
| Returns the title of the file to be uploaded. | |
| getVerificationErrorCode ( $error) | |
| initializeFromRequest (&$request) | |
| Initialize from a WebRequest. | |
| initializePathInfo ( $name, $tempPath, $fileSize, $removeTempFile=false) | |
| isEmptyFile () | |
| Return true if the file is empty. | |
| performUpload ( $comment, $pageText, $watch, $user, $tags=[], ?string $watchlistExpiry=null) | |
| Really perform the upload. | |
| postProcessUpload () | |
| Perform extra steps after a successful upload. | |
| skipStashFileAttempt () | |
| Check, if stash file attempt should be skipped, for example when the file is already known to stash. | |
| tryStashFile (User $user, $isPartial=false) | |
| Like stashFile(), but respects extensions' wishes to prevent the stashing. | |
| validateName () | |
| Verify that the name is valid and, if necessary, that we can overwrite. | |
| verifyUpload () | |
| Verify whether the upload is sensible. | |
Static Public Member Functions | |
| static | checkFileExtension ( $ext, $list) |
| Perform case-insensitive match against a list of file extensions. | |
| static | checkFileExtensionList ( $ext, $list) |
| Perform case-insensitive match against a list of file extensions. | |
| static | createFromRequest (&$request, $type=null) |
| Create a form of UploadBase depending on wpSourceType and initializes it. | |
| static | detectScript ( $file, $mime, $extension) |
| Heuristic for detecting files that could contain JavaScript instructions or things that may look like HTML to a browser and are thus potentially harmful. | |
| static | detectVirus ( $file) |
| Generic wrapper function for a virus scanner program. | |
| static | getExistsWarning ( $file) |
| Helper function that does various existence checks for a file. | |
| static | getFilenamePrefixBlacklist () |
| Get a list of disallowed filename prefixes from [[MediaWiki:Filename-prefix-blacklist]]. | |
| static | getMaxPhpUploadSize () |
| Get the PHP maximum uploaded file size, based on ini settings. | |
| static | getMaxUploadSize ( $forType=null) |
| Get MediaWiki's maximum uploaded file size for a given type of upload, based on $wgMaxUploadSize. | |
| static | getSessionStatus (UserIdentity $user, $statusKey) |
| Get the current status of a chunked upload (used for polling). | |
| static | isAllowed (Authority $performer) |
| Returns true if the user can use this upload module or else a string identifying the missing permission. | |
| static | isEnabled () |
| Returns true if uploads are enabled. | |
| static | isThrottled ( $user) |
| Returns true if the user has surpassed the upload rate limit, false otherwise. | |
| static | isThumbName ( $filename) |
| Helper function that checks whether the filename looks like a thumbnail. | |
| static | isValidRequest ( $request) |
| Check whether a request if valid for this handler. | |
| static | makeWarningsSerializable ( $warnings) |
| Convert the warnings array returned by checkWarnings() to something that can be serialized, and that is suitable for inclusion directly in action API results. | |
| static | setSessionStatus (UserIdentity $user, $statusKey, $value) |
| Set the current status of a chunked upload (used for polling). | |
| static | splitExtensions ( $filename) |
| Split a file into a base name and all dot-delimited 'extensions' on the end. | |
| static | unserializeWarnings ( $warnings) |
| Convert the serialized warnings array created by makeWarningsSerializable() back to the output of checkWarnings(). | |
| static | userCanReUpload (Authority $performer, File $img) |
| Check if a user is the last uploader. | |
| static | verifyExtension ( $mime, $extension) |
| Checks if the MIME type of the uploaded file matches the file extension. | |
Public Attributes | |
| const | EMPTY_FILE = 3 |
| const | FILE_TOO_LARGE = 12 |
| const | FILENAME_TOO_LONG = 14 |
| const | FILETYPE_BADTYPE = 9 |
| const | FILETYPE_MISSING = 8 |
| const | ILLEGAL_FILENAME = 5 |
| const | MIN_LENGTH_PARTNAME = 4 |
| const | OK = 0 |
| const | SUCCESS = 0 |
| const | VERIFICATION_ERROR = 10 |
| const | WINDOWS_NONASCII_FILENAME = 13 |
Protected Member Functions | |
| doStashFile (?User $user=null) | |
| Implementation for stashFile() and tryStashFile(). | |
| getFileProps () | |
| File props is very expensive on large files (due to sha1 calc) so it is important we save the result to reuse. | |
| runUploadStashFileHook (User $user) | |
| setTempFile ( $tempPath, $fileSize=null) | |
| verifyFile () | |
| Verifies that it's ok to include the uploaded file. | |
| verifyMimeType ( $mime) | |
| Verify the MIME type. | |
| verifyPartialFile () | |
| A verification routine suitable for partial files. | |
Protected Attributes | |
| string[] | $mBlackListedExtensions |
| string null | $mDesiredDestName |
| string null | $mDestName |
| array null | $mFileProps |
| int null | $mFileSize |
| string null | $mFilteredName |
| string null | $mFinalExtension |
| LocalFile null | $mLocalFile |
| bool null | $mRemoveTempFile |
| string null | $mSourceType |
| UploadStashFile null | $mStashFile |
| string null | $mTempPath |
| Local file system path to the file to upload (or a local copy) | |
| Title false null | $mTitle = false |
| int | $mTitleError = 0 |
| TempFSFile null | $tempFileObj |
| Wrapper to handle deleting the temp file. | |
UploadBase and subclasses are the backend of MediaWiki's file uploads.
The frontends are formed by ApiUpload and SpecialUpload.
Definition at line 62 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::__construct | ( | ) |
Definition at line 244 of file UploadBase.php.
References MediaWiki\MediaWikiServices\getInstance().
| MediaWiki\Upload\UploadBase::authorizeUpload | ( | Authority | $performer | ) |
Check whether the user can upload the image.
This method checks against the current title. Use verifyUpload() or validateName() first to check that the title is valid.
Definition at line 551 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::canFetchFile | ( | ) |
Perform checks to see if the file can be fetched.
Usually a no-op.
Reimplemented in MediaWiki\Upload\UploadFromUrl.
Definition at line 314 of file UploadBase.php.
|
static |
Perform case-insensitive match against a list of file extensions.
| string | $ext | File extension |
| array | $list |
Definition at line 1186 of file UploadBase.php.
|
static |
Perform case-insensitive match against a list of file extensions.
Returns an array of matching extensions.
| string[] | $ext | File extensions |
| string[] | $list |
Definition at line 1198 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::checkWarnings | ( | $user = null | ) |
Check for non fatal problems with the file.
This should not assume that mTempPath is set.
| User | null | $user | Accepted since 1.35 |
Definition at line 583 of file UploadBase.php.
Referenced by MediaWiki\JobQueue\Jobs\AssembleUploadChunksJob\run().
| MediaWiki\Upload\UploadBase::cleanupTempFile | ( | ) |
If we've modified the upload file, then we need to manually remove it on exit to clean up.
Definition at line 1148 of file UploadBase.php.
References wfDebug().
Referenced by MediaWiki\JobQueue\Jobs\AssembleUploadChunksJob\run().
| MediaWiki\Upload\UploadBase::convertVerifyErrorToStatus | ( | array | $error | ) |
Definition at line 1465 of file UploadBase.php.
References MediaWiki\Upload\UploadVerificationStatus\setRecoverableError().
Referenced by MediaWiki\Upload\UploadFromChunks\concatenateChunks().
|
static |
Create a form of UploadBase depending on wpSourceType and initializes it.
| WebRequest | &$request | |
| string | null | $type |
Definition at line 187 of file UploadBase.php.
References MediaWiki\MediaWikiServices\getInstance(), and wfDebug().
|
static |
Heuristic for detecting files that could contain JavaScript instructions or things that may look like HTML to a browser and are thus potentially harmful.
The present implementation will produce false positives in some situations.
| string | null | $file | Pathname to the temporary upload file |
| string | $mime | The MIME type of the file |
| string | null | $extension | The extension of the file |
Definition at line 1231 of file UploadBase.php.
References wfDeprecated().
|
static |
Generic wrapper function for a virus scanner program.
This relies on the $wgAntivirus and $wgAntivirusSetup variables. $wgAntivirusRequired may be used to deny upload if the scan fails.
| string | $file | Pathname to the temporary upload file |
Definition at line 1250 of file UploadBase.php.
References MediaWiki\Upload\UploadVerification\detectVirus(), and wfDeprecated().
|
protected |
Implementation for stashFile() and tryStashFile().
| User | null | $user |
Reimplemented in MediaWiki\Upload\UploadFromChunks.
Definition at line 1135 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::fetchFile | ( | ) |
Fetch the file.
Usually a no-op.
Definition at line 305 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::getDesiredDestName | ( | ) |
Get the desired destination name.
Definition at line 237 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\$mDesiredDestName.
|
static |
Helper function that does various existence checks for a file.
The following checks are performed:
| File | $file | The File object to check |
Definition at line 1324 of file UploadBase.php.
References NS_FILE.
|
static |
Get a list of disallowed filename prefixes from [[MediaWiki:Filename-prefix-blacklist]].
Definition at line 1428 of file UploadBase.php.
References wfMessage().
|
protected |
File props is very expensive on large files (due to sha1 calc) so it is important we save the result to reuse.
Definition at line 517 of file UploadBase.php.
References MediaWiki\MediaWikiServices\getInstance().
Referenced by MediaWiki\Upload\UploadBase\verifyFile().
| MediaWiki\Upload\UploadBase::getFileSize | ( | ) |
Return the file size.
Definition at line 330 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\$mFileSize.
| MediaWiki\Upload\UploadBase::getImageInfo | ( | $result = null | ) |
Gets image info about the file just uploaded.
| ?ApiResult | $result | unused since 1.42 |
Definition at line 1460 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::getLocalFile | ( | ) |
Return the local file and initializes if necessary.
Definition at line 1058 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\validateName().
|
static |
Get the PHP maximum uploaded file size, based on ini settings.
If there is no limit or the limit can't be guessed, return a very large number (PHP_INT_MAX) instead.
Definition at line 1573 of file UploadBase.php.
References wfShorthandToInteger().
|
static |
Get MediaWiki's maximum uploaded file size for a given type of upload, based on $wgMaxUploadSize.
| null | string | $forType |
Definition at line 1557 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\addChunk(), and MediaWiki\Upload\UploadBase\verifyUpload().
| MediaWiki\Upload\UploadBase::getRealPath | ( | $srcPath | ) |
| string | $srcPath | The source path |
Definition at line 351 of file UploadBase.php.
References $path, and MediaWiki\MediaWikiServices\getInstance().
Referenced by MediaWiki\Upload\UploadFromChunks\continueChunks(), and MediaWiki\Upload\UploadFromStash\initialize().
|
static |
Get the current status of a chunked upload (used for polling).
This should only be called during POST requests since we fetch from dc-local MainStash, and from a GET request we can't know that the value is available or up-to-date.
| UserIdentity | $user | |
| string | $statusKey |
Definition at line 1596 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::getSourceType | ( | ) |
Returns the upload type.
Should be overridden by child classes.
Reimplemented in MediaWiki\Upload\UploadFromFile, MediaWiki\Upload\UploadFromStash, and MediaWiki\Upload\UploadFromUrl.
Definition at line 255 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
| MediaWiki\Upload\UploadBase::getStashFile | ( | ) |
Definition at line 1072 of file UploadBase.php.
Referenced by MediaWiki\JobQueue\Jobs\AssembleUploadChunksJob\run().
| MediaWiki\Upload\UploadBase::getTempFileSha1Base36 | ( | ) |
Get the base 36 SHA1 of the file.
Reimplemented in MediaWiki\Upload\UploadFromStash.
Definition at line 339 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::getTempPath | ( | ) |
Definition at line 1159 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::getTitle | ( | ) |
Returns the title of the file to be uploaded.
Sets mTitleError in case the name was illegal.
Definition at line 915 of file UploadBase.php.
References NS_FILE, and wfStripIllegalFilenameChars().
Referenced by MediaWiki\Upload\UploadBase\validateName().
| MediaWiki\Upload\UploadBase::getVerificationErrorCode | ( | $error | ) |
|
abstract |
Initialize from a WebRequest.
Override this in a subclass.
| WebRequest | &$request |
Reimplemented in MediaWiki\Upload\UploadFromFile, MediaWiki\Upload\UploadFromStash, and MediaWiki\Upload\UploadFromUrl.
| MediaWiki\Upload\UploadBase::initializePathInfo | ( | $name, | |
| $tempPath, | |||
| $fileSize, | |||
| $removeTempFile = false ) |
| string | $name | The desired destination name |
| string | null | $tempPath | Callers should make sure this is not a storage path |
| int | null | $fileSize | |
| bool | $removeTempFile | (false) remove the temporary file? |
Definition at line 265 of file UploadBase.php.
References Wikimedia\FileBackend\FileBackend\isStoragePath(), and MediaWiki\Upload\UploadBase\setTempFile().
Referenced by MediaWiki\Upload\UploadFromChunks\continueChunks(), MediaWiki\Upload\UploadFromStash\initialize(), and MediaWiki\Upload\UploadFromFile\initialize().
|
static |
Returns true if the user can use this upload module or else a string identifying the missing permission.
Can be overridden by subclasses.
| Authority | $performer |
Reimplemented in MediaWiki\Upload\UploadFromUrl.
Definition at line 156 of file UploadBase.php.
References MediaWiki\Permissions\Authority\isAllowed().
| MediaWiki\Upload\UploadBase::isEmptyFile | ( | ) |
Return true if the file is empty.
Definition at line 322 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\$mFileSize.
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
|
static |
Returns true if uploads are enabled.
Can be override by subclasses.
Reimplemented in MediaWiki\Upload\UploadFromUrl.
Definition at line 142 of file UploadBase.php.
References MediaWiki\MainConfigNames\EnableUploads, MediaWiki\MediaWikiServices\getInstance(), and wfIniGetBool().
|
static |
Returns true if the user has surpassed the upload rate limit, false otherwise.
| User | $user |
Definition at line 175 of file UploadBase.php.
References wfDeprecated().
|
static |
Helper function that checks whether the filename looks like a thumbnail.
| string | $filename |
Definition at line 1413 of file UploadBase.php.
|
static |
Check whether a request if valid for this handler.
| WebRequest | $request |
Reimplemented in MediaWiki\Upload\UploadFromFile, MediaWiki\Upload\UploadFromStash, and MediaWiki\Upload\UploadFromUrl.
Definition at line 229 of file UploadBase.php.
|
static |
Convert the warnings array returned by checkWarnings() to something that can be serialized, and that is suitable for inclusion directly in action API results.
File objects will be converted to an associative array with the following keys:
| mixed[] | $warnings |
Definition at line 648 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::performUpload | ( | $comment, | |
| $pageText, | |||
| $watch, | |||
| $user, | |||
| $tags = [], | |||
| ?string | $watchlistExpiry = null ) |
Really perform the upload.
Stores the file in the local repo, watches if necessary and runs the UploadComplete hook.
| string | $comment | |
| string | false | $pageText | |
| bool | $watch | Whether the file page should be added to user's watchlist. (This doesn't check $user's permissions.) |
| User | $user | |
| string[] | $tags | Change tags to add to the log entry and page revision. (This doesn't check $user's permissions.) |
| string | null | $watchlistExpiry | Optional watchlist expiry timestamp in any format acceptable to wfTimestamp(). |
Definition at line 858 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::postProcessUpload | ( | ) |
Perform extra steps after a successful upload.
Reimplemented in MediaWiki\Upload\UploadFromStash.
Definition at line 906 of file UploadBase.php.
|
protected |
| User | $user |
Definition at line 1118 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\concatenateChunks().
|
static |
Set the current status of a chunked upload (used for polling).
The value will be set in cache for 1 day.
This should only be called during POST requests.
| UserIdentity | $user | |
| string | $statusKey | |
| array | false | $value |
Definition at line 1615 of file UploadBase.php.
References MediaWiki\User\UserIdentity\getName().
|
protected |
| string | null | $tempPath | File system path to temporary file containing the upload |
| int | null | $fileSize |
Definition at line 286 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\concatenateChunks(), and MediaWiki\Upload\UploadBase\initializePathInfo().
| MediaWiki\Upload\UploadBase::skipStashFileAttempt | ( | ) |
Check, if stash file attempt should be skipped, for example when the file is already known to stash.
Reimplemented in MediaWiki\Upload\UploadFromFile.
Definition at line 1110 of file UploadBase.php.
|
static |
Split a file into a base name and all dot-delimited 'extensions' on the end.
Some web server configurations will fall back to earlier pseudo-'extensions' to determine type and execute scripts, so we need to check them all.
| string | $filename |
Definition at line 1172 of file UploadBase.php.
| MediaWiki\Upload\UploadBase::tryStashFile | ( | User | $user, |
| $isPartial = false ) |
Like stashFile(), but respects extensions' wishes to prevent the stashing.
verifyUpload() must be called before calling this method (unless $isPartial is true).
Upload stash exceptions are also caught and converted to an error status.
| User | $user | |
| bool | $isPartial | Pass true if this is a part of a chunked upload (not a complete file). |
Reimplemented in MediaWiki\Upload\UploadFromChunks.
Definition at line 1088 of file UploadBase.php.
|
static |
Convert the serialized warnings array created by makeWarningsSerializable() back to the output of checkWarnings().
| mixed[] | $warnings |
Definition at line 673 of file UploadBase.php.
Check if a user is the last uploader.
| Authority | $performer | |
| File | $img |
Definition at line 1297 of file UploadBase.php.
References MediaWiki\FileRepo\File\File\getUploader(), MediaWiki\Permissions\Authority\getUser(), and MediaWiki\Permissions\Authority\isAllowed().
| MediaWiki\Upload\UploadBase::validateName | ( | ) |
Verify that the name is valid and, if necessary, that we can overwrite.
Definition at line 435 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\$mBlackListedExtensions, MediaWiki\Upload\UploadBase\$mFilteredName, MediaWiki\Upload\UploadBase\$mFinalExtension, MediaWiki\Upload\UploadBase\$mTitleError, MediaWiki\Upload\UploadBase\getLocalFile(), and MediaWiki\Upload\UploadBase\getTitle().
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
|
static |
Checks if the MIME type of the uploaded file matches the file extension.
| string | $mime | The MIME type of the uploaded file |
| string | $extension | The filename extension that the file is to be served with |
Definition at line 1210 of file UploadBase.php.
References wfDeprecated().
|
protected |
Verifies that it's ok to include the uploaded file.
Definition at line 483 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\getFileProps(), and MediaWiki\Upload\UploadBase\verifyPartialFile().
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
|
protected |
Verify the MIME type.
| string | $mime | Representing the MIME |
Definition at line 464 of file UploadBase.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\MimeTypeExclusions, MediaWiki\MainConfigNames\VerifyMimeType, and wfDebug().
|
protected |
A verification routine suitable for partial files.
Runs the deny list checks, but not any checks that may assume the entire file is present.
Definition at line 537 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\verifyFile().
| MediaWiki\Upload\UploadBase::verifyUpload | ( | ) |
Verify whether the upload is sensible.
Return a status array representing the outcome of the verification. Possible keys are:
Reimplemented in MediaWiki\Upload\UploadFromFile.
Definition at line 386 of file UploadBase.php.
References MediaWiki\Upload\UploadBase\EMPTY_FILE, MediaWiki\Upload\UploadBase\FILE_TOO_LARGE, MediaWiki\Upload\UploadBase\getMaxUploadSize(), MediaWiki\Upload\UploadBase\getSourceType(), MediaWiki\Upload\UploadBase\isEmptyFile(), MediaWiki\Upload\UploadBase\OK, MediaWiki\Upload\UploadBase\validateName(), MediaWiki\Upload\UploadBase\VERIFICATION_ERROR, and MediaWiki\Upload\UploadBase\verifyFile().
|
protected |
Definition at line 94 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\validateName().
|
protected |
Definition at line 70 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\getDesiredDestName().
|
protected |
Definition at line 72 of file UploadBase.php.
|
protected |
Definition at line 92 of file UploadBase.php.
|
protected |
Definition at line 90 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\getFileSize(), and MediaWiki\Upload\UploadBase\isEmptyFile().
|
protected |
Definition at line 82 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\validateName().
|
protected |
Definition at line 84 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\validateName().
|
protected |
Definition at line 86 of file UploadBase.php.
|
protected |
Definition at line 74 of file UploadBase.php.
|
protected |
Definition at line 76 of file UploadBase.php.
|
protected |
Definition at line 88 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\doStashFile().
|
protected |
Local file system path to the file to upload (or a local copy)
Definition at line 66 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\addChunk().
|
protected |
Definition at line 78 of file UploadBase.php.
|
protected |
Definition at line 80 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\validateName().
|
protected |
Wrapper to handle deleting the temp file.
Definition at line 68 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::EMPTY_FILE = 3 |
Definition at line 100 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
| const MediaWiki\Upload\UploadBase::FILE_TOO_LARGE = 12 |
Definition at line 106 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\verifyUpload(), and MediaWiki\Upload\UploadFromFile\verifyUpload().
| const MediaWiki\Upload\UploadBase::FILENAME_TOO_LONG = 14 |
Definition at line 108 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::FILETYPE_BADTYPE = 9 |
Definition at line 104 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::FILETYPE_MISSING = 8 |
Definition at line 103 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::ILLEGAL_FILENAME = 5 |
Definition at line 102 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::MIN_LENGTH_PARTNAME = 4 |
Definition at line 101 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::OK = 0 |
Definition at line 99 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadFromChunks\concatenateChunks(), and MediaWiki\Upload\UploadBase\verifyUpload().
| const MediaWiki\Upload\UploadBase::SUCCESS = 0 |
Definition at line 98 of file UploadBase.php.
| const MediaWiki\Upload\UploadBase::VERIFICATION_ERROR = 10 |
Definition at line 105 of file UploadBase.php.
Referenced by MediaWiki\Upload\UploadBase\verifyUpload().
| const MediaWiki\Upload\UploadBase::WINDOWS_NONASCII_FILENAME = 13 |
Definition at line 107 of file UploadBase.php.