Page MenuHomePhabricator

Support HTML5 / Javascript chunked file uploads
ClosedPublic

Authored by epriestley on Mar 13 2015, 12:54 PM.
Tags
None
Referenced Files
F13283621: D12066.diff
Sun, Jun 2, 4:00 PM
F13270664: D12066.id.diff
Wed, May 29, 10:15 AM
F13269580: D12066.diff
Wed, May 29, 6:29 AM
F13256200: D12066.diff
Sat, May 25, 10:18 AM
F13217281: D12066.id29041.diff
Sat, May 18, 4:19 AM
F13205746: D12066.diff
Wed, May 15, 2:20 AM
F13189801: D12066.diff
Sat, May 11, 6:27 AM
F13180624: D12066.id.diff
Thu, May 9, 1:42 AM
Subscribers
Tokens
"Manufacturing Defect?" token, awarded by btrahan.

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
chunk4
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4872
Build 4890: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Support HTML5 / Javascript chunked file uploads.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

One thing that's not present here is support for resuming uploads: the file.allocate call will never match an existing upload based on content hash because we don't send a content hash (see D12065).

Instead, I'll match partial uploads based on file name, file size, author, and the "isPartial" flag in a future diff. I might add a dialog prompting users to resume, but <name + size> probably uniquely identifies every large file a reasonable user is likely to upload.

btrahan edited edge metadata.
This revision is now accepted and ready to land.Mar 13 2015, 6:19 PM
This revision was automatically updated to reflect the committed changes.