|
MediaWiki
REL1_24
|
Implements uploading from chunks. More...


Public Member Functions | |
| __construct ($user=null, $stash=false, $repo=false) | |
| Setup local pointers to stash, repo and user (similar to UploadFromStash) | |
| addChunk ($chunkPath, $chunkSize, $offset) | |
| Add a chunk to the temporary directory. | |
| concatenateChunks () | |
| Append the final chunk and ready file for parent::performUpload() | |
| continueChunks ($name, $key, $webRequestUpload) | |
| Continue chunk uploading. | |
| getVirtualChunkLocation ($index) | |
| Returns the virtual chunk location: | |
| performUpload ($comment, $pageText, $watch, $user) | |
| Perform the upload, then remove the temp copy afterward. | |
| stashFile (User $user=null) | |
| Calls the parent stashFile and updates the uploadsession table to handle "chunks". | |
Protected Attributes | |
| $mChunkIndex | |
| $mFileKey | |
| $mOffset | |
| $mVirtualTempPath | |
Private Member Functions | |
| getChunkFileKey ($index=null) | |
| getChunkIndex () | |
| Get the current Chunk index. | |
| getChunkStatus () | |
| Get the chunk db state and populate update relevant local values. | |
| getOffset () | |
| Gets the current offset in fromt the stashedupload table. | |
| outputChunk ($chunkPath) | |
| Output the chunk to disk. | |
| updateChunkStatus () | |
| Update the chunk db table with the current status: | |
| verifyChunk () | |
| Verify that the chunk isn't really an evil html file. | |
Private Attributes | |
| LocalRepo | $repo |
| * | |
Implements uploading from chunks.
Definition at line 30 of file UploadFromChunks.php.
| UploadFromChunks::__construct | ( | $ | user = null, |
| $ | stash = false, |
||
| $ | repo = false |
||
| ) |
Setup local pointers to stash, repo and user (similar to UploadFromStash)
| User | null | $user | Default: null |
| UploadStash | bool | $stash | Default: false |
| FileRepo | bool | $repo | Default: false |
Definition at line 44 of file UploadFromChunks.php.
| UploadFromChunks::addChunk | ( | $ | chunkPath, |
| $ | chunkSize, | ||
| $ | offset | ||
| ) |
Add a chunk to the temporary directory.
| string | $chunkPath | Path to temporary chunk file |
| int | $chunkSize | Size of the current chunk |
| int | $offset | Offset of current chunk ( mutch match database chunk offset ) |
Definition at line 208 of file UploadFromChunks.php.
Append the final chunk and ready file for parent::performUpload()
Definition at line 118 of file UploadFromChunks.php.
| UploadFromChunks::continueChunks | ( | $ | name, |
| $ | key, | ||
| $ | webRequestUpload | ||
| ) |
Continue chunk uploading.
| string | $name | |
| string | $key | |
| WebRequestUpload | $webRequestUpload |
Definition at line 100 of file UploadFromChunks.php.
| UploadFromChunks::getChunkFileKey | ( | $ | index = null | ) | [private] |
Definition at line 350 of file UploadFromChunks.php.
References getChunkIndex().
| UploadFromChunks::getChunkIndex | ( | ) | [private] |
Get the current Chunk index.
Definition at line 296 of file UploadFromChunks.php.
Referenced by getChunkFileKey().
| UploadFromChunks::getChunkStatus | ( | ) | [private] |
Get the chunk db state and populate update relevant local values.
Definition at line 270 of file UploadFromChunks.php.
| UploadFromChunks::getOffset | ( | ) | [private] |
Gets the current offset in fromt the stashedupload table.
Definition at line 308 of file UploadFromChunks.php.
| UploadFromChunks::getVirtualChunkLocation | ( | $ | index | ) |
Returns the virtual chunk location:
| int | $index |
Definition at line 191 of file UploadFromChunks.php.
| UploadFromChunks::outputChunk | ( | $ | chunkPath | ) | [private] |
Output the chunk to disk.
| string | $chunkPath |
| UploadChunkFileException |
Definition at line 323 of file UploadFromChunks.php.
| UploadFromChunks::performUpload | ( | $ | comment, |
| $ | pageText, | ||
| $ | watch, | ||
| $ | user | ||
| ) |
Perform the upload, then remove the temp copy afterward.
| string | $comment | |
| string | $pageText | |
| bool | $watch | |
| User | $user |
Reimplemented from UploadBase.
Definition at line 180 of file UploadFromChunks.php.
| UploadFromChunks::stashFile | ( | User $ | user = null | ) |
Calls the parent stashFile and updates the uploadsession table to handle "chunks".
| User | null | $user |
Reimplemented from UploadBase.
Definition at line 72 of file UploadFromChunks.php.
| UploadFromChunks::updateChunkStatus | ( | ) | [private] |
Update the chunk db table with the current status:
Definition at line 246 of file UploadFromChunks.php.
| UploadFromChunks::verifyChunk | ( | ) | [private] |
Verify that the chunk isn't really an evil html file.
| UploadChunkVerificationException |
Definition at line 363 of file UploadFromChunks.php.
UploadFromChunks::$mChunkIndex [protected] |
Definition at line 32 of file UploadFromChunks.php.
UploadFromChunks::$mFileKey [protected] |
Definition at line 33 of file UploadFromChunks.php.
UploadFromChunks::$mOffset [protected] |
Definition at line 31 of file UploadFromChunks.php.
UploadFromChunks::$mVirtualTempPath [protected] |
Definition at line 34 of file UploadFromChunks.php.
LocalRepo UploadFromChunks::$repo [private] |
*
Definition at line 35 of file UploadFromChunks.php.