mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Add "uri" to the API results for File objects
Summary: Ref T13528. This supports "arc upload --browse ...". Test Plan: Called "file.search", saw URIs in results. Maniphest Tasks: T13528 Differential Revision: https://secure.phabricator.com/D21204
This commit is contained in:
parent
fbbd2e35cb
commit
eab561bb87
1 changed files with 6 additions and 1 deletions
|
@ -1655,9 +1655,13 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||
->setKey('name')
|
||||
->setType('string')
|
||||
->setDescription(pht('The name of the file.')),
|
||||
id(new PhabricatorConduitSearchFieldSpecification())
|
||||
->setKey('uri')
|
||||
->setType('uri')
|
||||
->setDescription(pht('View URI for the file.')),
|
||||
id(new PhabricatorConduitSearchFieldSpecification())
|
||||
->setKey('dataURI')
|
||||
->setType('string')
|
||||
->setType('uri')
|
||||
->setDescription(pht('Download URI for the file data.')),
|
||||
id(new PhabricatorConduitSearchFieldSpecification())
|
||||
->setKey('size')
|
||||
|
@ -1669,6 +1673,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||
public function getFieldValuesForConduit() {
|
||||
return array(
|
||||
'name' => $this->getName(),
|
||||
'uri' => PhabricatorEnv::getURI($this->getURI()),
|
||||
'dataURI' => $this->getCDNURI('data'),
|
||||
'size' => (int)$this->getByteSize(),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue