Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15435008
D17621.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17621.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17621: Allow "arc upload" to work correctly if it can not hash content
Attached
Detach File
Event Timeline
Log In to Comment