diff --git a/src/workflow/ArcanistUploadWorkflow.php b/src/workflow/ArcanistUploadWorkflow.php index 12548e2b..7094cdce 100644 --- a/src/workflow/ArcanistUploadWorkflow.php +++ b/src/workflow/ArcanistUploadWorkflow.php @@ -66,6 +66,8 @@ EOTEXT } $length = filesize($path); + $do_chunk_upload = false; + $phid = null; try { $result = $conduit->callMethodSynchronous( @@ -90,7 +92,7 @@ EOTEXT // file data. } else { if ($phid) { - $this->uploadChunks($phid, $path); + $do_chunk_upload = true; } else { // This is a small file that doesn't need to be uploaded in // chunks, so continue normally. @@ -101,6 +103,10 @@ EOTEXT pht('Unable to use allocate method, trying older upload method.')); } + if ($do_chunk_upload) { + $this->uploadChunks($phid, $path); + } + if (!$phid) { try { $data = Filesystem::readFile($path);