diff --git a/src/upload/ArcanistFileDataRef.php b/src/upload/ArcanistFileDataRef.php --- a/src/upload/ArcanistFileDataRef.php +++ b/src/upload/ArcanistFileDataRef.php @@ -222,15 +222,6 @@ $path)); } - $hash = @sha1_file($path); - if ($hash === false) { - throw new Exception( - pht( - 'Unable to upload file: failed to calculate file data hash for '. - 'path "%s".', - $path)); - } - $size = @filesize($path); if ($size === false) { throw new Exception( @@ -240,11 +231,11 @@ $path)); } - $this->hash = $hash; + $this->hash = $this->newFileHash($path); $this->size = $size; } else { $data = $this->data; - $this->hash = sha1($data); + $this->hash = $this->newDataHash($data); $this->size = strlen($data); } } @@ -354,4 +345,12 @@ return $data; } + private function newFileHash($path) { + return null; + } + + private function newDataHash($data) { + return null; + } + }