Last modified: 2012-11-03 10:34:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31250, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29250 - UploadWizard: Resumable uploads
UploadWizard: Resumable uploads
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: High enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-reviewed
Depends on: 30244
Blocks: 24759 27800
  Show dependency treegraph
 
Reported: 2011-06-02 18:10 UTC by Neil Kandalgaonkar
Modified: 2012-11-03 10:34 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Resumable upload using database to sync state patch (23.34 KB, patch)
2011-11-17 23:16 UTC, Michael Dale
Details

Description Neil Kandalgaonkar 2011-06-02 18:10:35 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)
Comment 1 Michael Dale 2011-09-07 20:02:38 UTC
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
Comment 2 Michael Dale 2011-11-17 23:16:20 UTC
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
Comment 3 Jan Gerber 2011-11-18 11:33:55 UTC
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 );
Comment 4 Erik Moeller 2012-01-22 05:02:23 UTC
(Patch applied, will be enabled when chunked uploading support is in the API.)
Comment 5 Thehelpfulone 2012-06-22 19:40:47 UTC
Reassigning to wikibugs-l per bug 37789

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links