1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

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
This commit is contained in:
epriestley 2015-03-15 11:32:18 -07:00
parent bc28b2c3a8
commit 6b69bc3fbb
2 changed files with 0 additions and 16 deletions

View file

@ -17,9 +17,6 @@ final class FileAllocateConduitAPIMethod
'contentLength' => 'int', 'contentLength' => 'int',
'contentHash' => 'optional string', 'contentHash' => 'optional string',
'viewPolicy' => 'optional string', 'viewPolicy' => 'optional string',
// TODO: Remove this, it's just here to make testing easier.
'forceChunking' => 'optional bool',
); );
} }
@ -39,8 +36,6 @@ final class FileAllocateConduitAPIMethod
$view_policy = $request->getValue('viewPolicy'); $view_policy = $request->getValue('viewPolicy');
$length = $request->getValue('contentLength'); $length = $request->getValue('contentLength');
$force_chunking = $request->getValue('forceChunking');
$properties = array( $properties = array(
'name' => $name, 'name' => $name,
'authorPHID' => $viewer->getPHID(), 'authorPHID' => $viewer->getPHID(),
@ -93,14 +88,6 @@ final class FileAllocateConduitAPIMethod
$engines = PhabricatorFileStorageEngine::loadStorageEngines($length); $engines = PhabricatorFileStorageEngine::loadStorageEngines($length);
if ($engines) { if ($engines) {
if ($force_chunking) {
foreach ($engines as $key => $engine) {
if (!$engine->isChunkEngine()) {
unset($engines[$key]);
}
}
}
// Pick the first engine. If the file is small enough to fit into a // Pick the first engine. If the file is small enough to fit into a
// single engine without chunking, this will be a non-chunk engine and // single engine without chunking, this will be a non-chunk engine and
// we'll just tell the client to upload the file. // we'll just tell the client to upload the file.

View file

@ -42,9 +42,6 @@ final class PhabricatorFileDropUploadController
'name' => $name, 'name' => $name,
'contentLength' => $request->getInt('length'), 'contentLength' => $request->getInt('length'),
'viewPolicy' => $view_policy, 'viewPolicy' => $view_policy,
// TODO: Remove.
// 'forceChunking' => true,
); );
$result = id(new ConduitCall('file.allocate', $params)) $result = id(new ConduitCall('file.allocate', $params))