UploadWizard: Resumable uploads
Closed, ResolvedPublic

Description

Author: neilk

Description:
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)


Version: unspecified
Severity: enhancement

bzimport set Reference to bz29250.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jun 2 2011, 6:10 PM

mdale wrote:

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

mdale wrote:

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

Attached: mediaWiki_trunk.Bug.29250.Resumable.Uploads.patch

jgerber wrote:

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.)

Thehelpfulonewiki wrote:

Reassigning to wikibugs-l per bug 37789

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 4 2014, 10:21 AM
Gilles raised the priority of this task from "High" to "Unbreak Now!".
Gilles lowered the priority of this task from "Unbreak Now!" to "High".Dec 4 2014, 11:21 AM

Add Comment