Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15302690
D17618.id42370.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
D17618.id42370.diff
View Options
diff --git a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
--- a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
@@ -3,12 +3,21 @@
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() {
@@ -19,25 +28,11 @@
}
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 6, 8:00 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309020
Default Alt Text
D17618.id42370.diff (1 KB)
Attached To
Mode
D17618: Deprecate "file.uploadhash"
Attached
Detach File
Event Timeline
Log In to Comment