Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F569664
PhabricatorFilesApplication.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
PhabricatorFilesApplication.php
View Options
<?php
final
class
PhabricatorFilesApplication
extends
PhabricatorApplication
{
public
function
getBaseURI
()
{
return
'/file/'
;
}
public
function
getName
()
{
return
pht
(
'Files'
);
}
public
function
getShortDescription
()
{
return
pht
(
'Store and Share Files'
);
}
public
function
getIcon
()
{
return
'fa-file'
;
}
public
function
getTitleGlyph
()
{
return
"
\x
E2
\x
87
\x
AA"
;
}
public
function
getFlavorText
()
{
return
pht
(
'Blob store for Pokemon pictures.'
);
}
public
function
getApplicationGroup
()
{
return
self
::
GROUP_UTILITIES
;
}
public
function
canUninstall
()
{
return
false
;
}
public
function
getRemarkupRules
()
{
return
array
(
new
PhabricatorEmbedFileRemarkupRule
(),
new
PhabricatorImageRemarkupRule
(),
);
}
public
function
supportsEmailIntegration
()
{
return
true
;
}
public
function
getAppEmailBlurb
()
{
return
pht
(
'Send emails with file attachments to these addresses to upload '
.
'files. %s'
,
phutil_tag
(
'a'
,
array
(
'href'
=>
$this
->
getInboundEmailSupportLink
(),
),
pht
(
'Learn More'
)));
}
protected
function
getCustomCapabilities
()
{
return
array
(
FilesDefaultViewCapability
::
CAPABILITY
=>
array
(
'caption'
=>
pht
(
'Default view policy for newly created files.'
),
'template'
=>
PhabricatorFileFilePHIDType
::
TYPECONST
,
'capability'
=>
PhabricatorPolicyCapability
::
CAN_VIEW
,
),
);
}
public
function
getMonograms
()
{
return
array
(
'F'
);
}
public
function
getRoutes
()
{
return
array
(
'/F(?P<id>[1-9]
\d
*)(?:
\$
(?P<lines>
\d
+(?:-
\d
+)?))?'
=>
'PhabricatorFileViewController'
,
'/file/'
=>
array
(
'(query/(?P<queryKey>[^/]+)/)?'
=>
'PhabricatorFileListController'
,
'view/(?P<id>[1-9]
\d
*)/'
.
'(?:(?P<engineKey>[^/]+)/)?'
.
'(?:
\$
(?P<lines>
\d
+(?:-
\d
+)?))?'
=>
'PhabricatorFileViewController'
,
'info/(?P<phid>[^/]+)/'
=>
'PhabricatorFileViewController'
,
'upload/'
=>
'PhabricatorFileUploadController'
,
'dropupload/'
=>
'PhabricatorFileDropUploadController'
,
'compose/'
=>
'PhabricatorFileComposeController'
,
'thread/(?P<phid>[^/]+)/'
=>
'PhabricatorFileLightboxController'
,
'delete/(?P<id>[1-9]
\d
*)/'
=>
'PhabricatorFileDeleteController'
,
$this
->
getEditRoutePattern
(
'edit/'
)
=>
'PhabricatorFileEditController'
,
'imageproxy/'
=>
'PhabricatorFileImageProxyController'
,
'transforms/(?P<id>[1-9]
\d
*)/'
=>
'PhabricatorFileTransformListController'
,
'uploaddialog/(?P<single>single/)?'
=>
'PhabricatorFileUploadDialogController'
,
'iconset/(?P<key>[^/]+)/'
=>
array
(
'select/'
=>
'PhabricatorFileIconSetSelectController'
,
),
'document/(?P<engineKey>[^/]+)/(?P<phid>[^/]+)/'
=>
'PhabricatorFileDocumentController'
,
'ui/'
=>
array
(
'detach/(?P<objectPHID>[^/]+)/(?P<filePHID>[^/]+)/'
=>
'PhabricatorFileDetachController'
,
'curtain/'
=>
array
(
'list/(?P<phid>[^/]+)/'
=>
'PhabricatorFileUICurtainListController'
,
'attach/(?P<objectPHID>[^/]+)/(?P<filePHID>[^/]+)/'
=>
'PhabricatorFileUICurtainAttachController'
,
),
),
)
+
$this
->
getResourceSubroutes
(),
);
}
public
function
getResourceRoutes
()
{
return
array
(
'/file/'
=>
$this
->
getResourceSubroutes
(),
);
}
private
function
getResourceSubroutes
()
{
return
array
(
'(?P<kind>data|download)/'
.
'(?:@(?P<instance>[^/]+)/)?'
.
'(?P<key>[^/]+)/'
.
'(?P<phid>[^/]+)/'
.
'(?:(?P<token>[^/]+)/)?'
.
'.*'
=>
'PhabricatorFileDataController'
,
'xform/'
.
'(?:@(?P<instance>[^/]+)/)?'
.
'(?P<transform>[^/]+)/'
.
'(?P<phid>[^/]+)/'
.
'(?P<key>[^/]+)/'
=>
'PhabricatorFileTransformController'
,
);
}
public
function
getMailCommandObjects
()
{
return
array
(
'file'
=>
array
(
'name'
=>
pht
(
'Email Commands: Files'
),
'header'
=>
pht
(
'Interacting with Files'
),
'object'
=>
new
PhabricatorFile
(),
'summary'
=>
pht
(
'This page documents the commands you can use to interact with '
.
'files.'
),
),
);
}
public
function
getQuicksandURIPatternBlacklist
()
{
return
array
(
'/file/(data|download)/.*'
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 2:53 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
114375
Default Alt Text
PhabricatorFilesApplication.php (4 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment