Page MenuHomePhabricator

D17621.diff
No OneTemporary

D17621.diff

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;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 26, 6:21 AM (2 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7719341
Default Alt Text
D17621.diff (1 KB)

Event Timeline