(bug 44923) Fix API upload with only one chunk
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 26 Feb 2013 23:19:52 +0000 (15:19 -0800)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 27 Feb 2013 01:36:42 +0000 (17:36 -0800)
commitcd1398d4d644cf5e103427f49f24c63d065a27c2
tree0edfd8757aff6d874880666c867a305cf81fce79
parent4139e3685582db9fb9cf80c161df8a47f7e968f6
(bug 44923) Fix API upload with only one chunk

The API supports chunked uploads to upload a file in multiple pieces.
But it doesn't check if the the entire file is uploaded in the first
chunk, so it winds up waiting for a subsequent chunk that can never
come.

It's actually fairly easy to fix, we just need to move the check for
"did we get the entire file?" outside of the "if we're getting a chunk
after the first" check.

Change-Id: I915c1678dfa3107f1739fed8613ab9452139b946
RELEASE-NOTES-1.21
includes/api/ApiUpload.php