3 final class PhabricatorFilesApplication
extends PhabricatorApplication
{
5 public function getBaseURI() {
9 public function getName() {
13 public function getShortDescription() {
14 return pht('Store and Share Files');
17 public function getIcon() {
21 public function getTitleGlyph() {
22 return "\xE2\x87\xAA";
25 public function getFlavorText() {
26 return pht('Blob store for Pokemon pictures.');
29 public function getApplicationGroup() {
30 return self
::GROUP_UTILITIES
;
33 public function canUninstall() {
37 public function getRemarkupRules() {
39 new PhabricatorEmbedFileRemarkupRule(),
40 new PhabricatorImageRemarkupRule(),
44 public function supportsEmailIntegration() {
48 public function getAppEmailBlurb() {
50 'Send emails with file attachments to these addresses to upload '.
55 'href' => $this->getInboundEmailSupportLink(),
60 protected function getCustomCapabilities() {
62 FilesDefaultViewCapability
::CAPABILITY
=> array(
63 'caption' => pht('Default view policy for newly created files.'),
64 'template' => PhabricatorFileFilePHIDType
::TYPECONST
,
65 'capability' => PhabricatorPolicyCapability
::CAN_VIEW
,
70 public function getRoutes() {
72 '/F(?P<id>[1-9]\d*)(?:\$(?P<lines>\d+(?:-\d+)?))?'
73 => 'PhabricatorFileViewController',
75 '(query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorFileListController',
76 'view/(?P<id>[1-9]\d*)/'.
77 '(?:(?P<engineKey>[^/]+)/)?'.
78 '(?:\$(?P<lines>\d+(?:-\d+)?))?'
79 => 'PhabricatorFileViewController',
80 'info/(?P<phid>[^/]+)/' => 'PhabricatorFileViewController',
81 'upload/' => 'PhabricatorFileUploadController',
82 'dropupload/' => 'PhabricatorFileDropUploadController',
83 'compose/' => 'PhabricatorFileComposeController',
84 'thread/(?P<phid>[^/]+)/' => 'PhabricatorFileLightboxController',
85 'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorFileDeleteController',
86 $this->getEditRoutePattern('edit/')
87 => 'PhabricatorFileEditController',
88 'imageproxy/' => 'PhabricatorFileImageProxyController',
89 'transforms/(?P<id>[1-9]\d*)/' =>
90 'PhabricatorFileTransformListController',
91 'uploaddialog/(?P<single>single/)?'
92 => 'PhabricatorFileUploadDialogController',
93 'iconset/(?P<key>[^/]+)/' => array(
94 'select/' => 'PhabricatorFileIconSetSelectController',
96 'document/(?P<engineKey>[^/]+)/(?P<phid>[^/]+)/'
97 => 'PhabricatorFileDocumentController',
99 'detach/(?P<objectPHID>[^/]+)/(?P<filePHID>[^/]+)/'
100 => 'PhabricatorFileDetachController',
102 'list/(?P<phid>[^/]+)/'
103 => 'PhabricatorFileUICurtainListController',
104 'attach/(?P<objectPHID>[^/]+)/(?P<filePHID>[^/]+)/'
105 => 'PhabricatorFileUICurtainAttachController',
108 ) +
$this->getResourceSubroutes(),
112 public function getResourceRoutes() {
114 '/file/' => $this->getResourceSubroutes(),
118 private function getResourceSubroutes() {
120 '(?P<kind>data|download)/'.
121 '(?:@(?P<instance>[^/]+)/)?'.
124 '(?:(?P<token>[^/]+)/)?'.
126 => 'PhabricatorFileDataController',
128 '(?:@(?P<instance>[^/]+)/)?'.
129 '(?P<transform>[^/]+)/'.
132 => 'PhabricatorFileTransformController',
136 public function getMailCommandObjects() {
139 'name' => pht('Email Commands: Files'),
140 'header' => pht('Interacting with Files'),
141 'object' => new PhabricatorFile(),
143 'This page documents the commands you can use to interact with '.
149 public function getQuicksandURIPatternBlacklist() {
151 '/file/(data|download)/.*',