Last modified: 2012-11-03 10:34:46 UTC
Allow for an chunked uploading protocol similar to Google's Resumable Media Upload protocol: http://code.google.com/apis/gdata/docs/resumable_upload.html This will have the benefit of making uploads resistant to intermittent connection drops, and will also make it possible to have progress bars without Flash (bug 24759)
Resumable uploads is supported in trunk uploadWizard. Any update on review? Once reviewed we can simply set: $wgUploadWizardConfig['enableFormData'] = true; And we need to deploy the mediaWiki trunk side api changes related to adding upload files in chunks: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93720
Created attachment 9488 [details] Resumable upload using database to sync state patch I think some things can still be cleaned up, but all working, so I wanted to get feedback. Changes Overview: * Subclass out UploadFromChunks having it extend UploadFromFile since it was getting kind of messy having UploadFromFile handling both cases. * The main execute function in ApiUpload was getting a little long and hard to follow, re factored at least the result context part into a few private methods. * Added sa_chunk_inx filed to uploadstash for keeping track of the chunk inx. Added to tables.sql and mysqlUpdater.php / patch-uploadstash_chunk.sql ) * Deprecated appendToUploadFile and appendFinish in UploadBase for 1.19 since we won't have append around in the future. * removed getFileTempname from UploadFromFile ( not used anywhere ) * To simplify implementation mFile is left as a reference to the original first stashed chunk, and just put chunks into the stashed folder by number
tested with trunk and works fine so far, one issue i saw is that the chunks are not deleted after concatenation. passing the DELETE_SOURCE flag fixes that. + $status = $this->repo->concatenate( $fileList, $this->mVirtualTempPath, FileRepo::DELETE_SOURCE );
(Patch applied, will be enabled when chunked uploading support is in the API.)
Reassigning to wikibugs-l per bug 37789