Support HTML5 / Javascript chunked file uploads

Summary:
Ref T7149. This adds chunking support to drag-and-drop uploads. It never activates right now unless you hack things up, since the chunk engine is still hard-coded as disabled.

The overall approach is the same as `arc upload` in D12061, with some slight changes to the API return values to avoid a few extra HTTP calls.

Test Plan:
  - Enabled chunk engine.
  - Uploaded some READMEs in a bunch of tiny 32 byte chunks.
  - Worked out of the box in Safari, Chrome, Firefox.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7149

Differential Revision: https://secure.phabricator.com/D12066
This commit is contained in:
epriestley
2015-03-13 11:30:36 -07:00
parent aa4adf3ab8
commit 135280be9e
11 changed files with 492 additions and 113 deletions

View File

@@ -162,7 +162,7 @@ final class PhabricatorChunkedFileStorageEngine
return false;
}
private function getChunkSize() {
public function getChunkSize() {
// TODO: This is an artificially small size to make it easier to
// test chunking.
return 32;