Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/PhabricatorFile.php
| Show First 20 Lines • Show All 1,650 Lines • ▼ Show 20 Lines | /* -( PhabricatorConduitResultInterface )---------------------------------- */ | ||||
| public function getFieldSpecificationsForConduit() { | public function getFieldSpecificationsForConduit() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
| ->setKey('name') | ->setKey('name') | ||||
| ->setType('string') | ->setType('string') | ||||
| ->setDescription(pht('The name of the file.')), | ->setDescription(pht('The name of the file.')), | ||||
| id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
| ->setKey('uri') | |||||
| ->setType('uri') | |||||
| ->setDescription(pht('View URI for the file.')), | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('dataURI') | ->setKey('dataURI') | ||||
| ->setType('string') | ->setType('uri') | ||||
| ->setDescription(pht('Download URI for the file data.')), | ->setDescription(pht('Download URI for the file data.')), | ||||
| id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
| ->setKey('size') | ->setKey('size') | ||||
| ->setType('int') | ->setType('int') | ||||
| ->setDescription(pht('File size, in bytes.')), | ->setDescription(pht('File size, in bytes.')), | ||||
| ); | ); | ||||
| } | } | ||||
| public function getFieldValuesForConduit() { | public function getFieldValuesForConduit() { | ||||
| return array( | return array( | ||||
| 'name' => $this->getName(), | 'name' => $this->getName(), | ||||
| 'uri' => PhabricatorEnv::getURI($this->getURI()), | |||||
| 'dataURI' => $this->getCDNURI('data'), | 'dataURI' => $this->getCDNURI('data'), | ||||
| 'size' => (int)$this->getByteSize(), | 'size' => (int)$this->getByteSize(), | ||||
| ); | ); | ||||
| } | } | ||||
| public function getConduitSearchAttachments() { | public function getConduitSearchAttachments() { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| Show All 12 Lines | |||||