Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
index 135e018a2f..db7a6acecb 100644
--- a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
@@ -1,43 +1,38 @@
<?php
final class FileUploadHashConduitAPIMethod extends FileConduitAPIMethod {
public function getAPIMethodName() {
- // TODO: Deprecate this in favor of `file.allocate`.
return 'file.uploadhash';
}
+ public function getMethodStatus() {
+ return self::METHOD_STATUS_DEPRECATED;
+ }
+
+ public function getMethodStatusDescription() {
+ return pht(
+ 'This method is deprecated. Callers should use "file.allocate" '.
+ 'instead.');
+ }
+
public function getMethodDescription() {
- return pht('Upload a file to the server using content hash.');
+ return pht('Obsolete. Has no effect.');
}
protected function defineParamTypes() {
return array(
'hash' => 'required nonempty string',
'name' => 'required nonempty string',
);
}
protected function defineReturnType() {
- return 'phid or null';
+ return 'null';
}
protected function execute(ConduitAPIRequest $request) {
- $hash = $request->getValue('hash');
- $name = $request->getValue('name');
- $user = $request->getUser();
-
- $file = PhabricatorFile::newFileFromContentHash(
- $hash,
- array(
- 'name' => $name,
- 'authorPHID' => $user->getPHID(),
- ));
-
- if ($file) {
- return $file->getPHID();
- }
- return $file;
+ return null;
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Mar 14, 10:01 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71768
Default Alt Text
(1 KB)

Event Timeline