Page MenuHomePhabricator

Support HTML5 / Javascript chunked file uploads
ClosedPublic

Authored by epriestley on Mar 13 2015, 12:54 PM.
Tags
None
Referenced Files
F14013770: D12066.id29034.diff
Sat, Nov 2, 12:27 PM
F14007223: D12066.diff
Tue, Oct 29, 2:01 AM
F14002967: D12066.diff
Sat, Oct 26, 12:26 AM
F13981913: D12066.id29041.diff
Sat, Oct 19, 7:56 PM
F13976102: D12066.id29034.diff
Oct 18 2024, 12:53 PM
Unknown Object (File)
Oct 8 2024, 12:32 PM
Unknown Object (File)
Oct 1 2024, 12:10 PM
Unknown Object (File)
Sep 24 2024, 2:01 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.