[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Backend for uploading files from chunks. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 385 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
UploadFromChunks:: (14 methods):
__construct()
stashFile()
continueChunks()
concatenateChunks()
performUpload()
getVirtualChunkLocation()
addChunk()
updateChunkStatus()
getChunkStatus()
getChunkIndex()
getOffset()
outputChunk()
getChunkFileKey()
verifyChunk()
UploadChunkZeroLengthFileException:: (0 methods):
UploadChunkFileException:: (0 methods):
UploadChunkVerificationException:: (0 methods):
Class: UploadFromChunks - X-Ref
Implements uploading from chunks__construct( $user = null, $stash = false, $repo = false ) X-Ref |
Setup local pointers to stash, repo and user (similar to UploadFromStash) param: User|null $user Default: null param: UploadStash|bool $stash Default: false param: FileRepo|bool $repo Default: false |
stashFile( User $user = null ) X-Ref |
Calls the parent stashFile and updates the uploadsession table to handle "chunks" param: User|null $user return: UploadStashFile Stashed file |
continueChunks( $name, $key, $webRequestUpload ) X-Ref |
Continue chunk uploading param: string $name param: string $key param: WebRequestUpload $webRequestUpload |
concatenateChunks() X-Ref |
Append the final chunk and ready file for parent::performUpload() return: FileRepoStatus |
performUpload( $comment, $pageText, $watch, $user ) X-Ref |
Perform the upload, then remove the temp copy afterward param: string $comment param: string $pageText param: bool $watch param: User $user return: Status |
getVirtualChunkLocation( $index ) X-Ref |
Returns the virtual chunk location: param: int $index return: string |
addChunk( $chunkPath, $chunkSize, $offset ) X-Ref |
Add a chunk to the temporary directory param: string $chunkPath Path to temporary chunk file param: int $chunkSize Size of the current chunk param: int $offset Offset of current chunk ( mutch match database chunk offset ) return: Status |
updateChunkStatus() X-Ref |
Update the chunk db table with the current status: |
getChunkStatus() X-Ref |
Get the chunk db state and populate update relevant local values |
getChunkIndex() X-Ref |
Get the current Chunk index return: int Index of the current chunk |
getOffset() X-Ref |
Gets the current offset in fromt the stashedupload table return: int Current byte offset of the chunk file set |
outputChunk( $chunkPath ) X-Ref |
Output the chunk to disk param: string $chunkPath return: FileRepoStatus |
getChunkFileKey( $index = null ) X-Ref |
No description |
verifyChunk() X-Ref |
Verify that the chunk isn't really an evil html file |
Class: UploadChunkZeroLengthFileException - X-Ref
Class: UploadChunkFileException - X-Ref
Class: UploadChunkVerificationException - X-Ref
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |