Skip to content

Commit 6b69bc3

Browse files
author
epriestley
committed
Delete all "force chunking" file upload code
Summary: Ref T7149. This was just to make testing easier, but chunking substantially works now. Test Plan: `grep` Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7149 Differential Revision: https://secure.phabricator.com/D12076
1 parent bc28b2c commit 6b69bc3

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/applications/files/conduit/FileAllocateConduitAPIMethod.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ public function defineParamTypes() {
1717
'contentLength' => 'int',
1818
'contentHash' => 'optional string',
1919
'viewPolicy' => 'optional string',
20-
21-
// TODO: Remove this, it's just here to make testing easier.
22-
'forceChunking' => 'optional bool',
2320
);
2421
}
2522

@@ -39,8 +36,6 @@ protected function execute(ConduitAPIRequest $request) {
3936
$view_policy = $request->getValue('viewPolicy');
4037
$length = $request->getValue('contentLength');
4138

42-
$force_chunking = $request->getValue('forceChunking');
43-
4439
$properties = array(
4540
'name' => $name,
4641
'authorPHID' => $viewer->getPHID(),
@@ -93,14 +88,6 @@ protected function execute(ConduitAPIRequest $request) {
9388
$engines = PhabricatorFileStorageEngine::loadStorageEngines($length);
9489
if ($engines) {
9590

96-
if ($force_chunking) {
97-
foreach ($engines as $key => $engine) {
98-
if (!$engine->isChunkEngine()) {
99-
unset($engines[$key]);
100-
}
101-
}
102-
}
103-
10491
// Pick the first engine. If the file is small enough to fit into a
10592
// single engine without chunking, this will be a non-chunk engine and
10693
// we'll just tell the client to upload the file.

src/applications/files/controller/PhabricatorFileDropUploadController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public function processRequest() {
4242
'name' => $name,
4343
'contentLength' => $request->getInt('length'),
4444
'viewPolicy' => $view_policy,
45-
46-
// TODO: Remove.
47-
// 'forceChunking' => true,
4845
);
4946

5047
$result = id(new ConduitCall('file.allocate', $params))

0 commit comments

Comments
 (0)