Page MenuHomePhabricator

Support HTML5 / Javascript chunked file uploads
ClosedPublic

Authored by epriestley on Mar 13 2015, 12:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 6, 6:36 PM
Unknown Object (File)
Tue, Apr 29, 6:22 PM
Unknown Object (File)
Apr 27 2025, 3:16 PM
Unknown Object (File)
Apr 26 2025, 2:47 PM
Unknown Object (File)
Apr 26 2025, 6:46 AM
Unknown Object (File)
Mar 31 2025, 8:48 PM
Unknown Object (File)
Mar 31 2025, 8:19 AM
Unknown Object (File)
Mar 31 2025, 6:20 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.