2012-10-01 14:05:12 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012 Facebook, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
final class PhabricatorApplicationFiles extends PhabricatorApplication {
|
|
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
|
return '/file/';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
|
return 'Store and Share Files';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getAutospriteName() {
|
|
|
|
|
return 'files';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getTitleGlyph() {
|
|
|
|
|
return "\xE2\x87\xAA";
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-03 15:16:26 -07:00
|
|
|
public function getFlavorText() {
|
|
|
|
|
return pht('Blob store for Pokemon pictures.');
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-03 15:46:19 -07:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-01 14:05:12 -07:00
|
|
|
public function getRoutes() {
|
|
|
|
|
return array(
|
2012-10-05 16:06:16 -07:00
|
|
|
'/F(?P<id>[1-9]\d*)' => 'PhabricatorFileShortcutController',
|
2012-10-01 14:05:12 -07:00
|
|
|
'/file/' => array(
|
|
|
|
|
'' => 'PhabricatorFileListController',
|
|
|
|
|
'filter/(?P<filter>\w+)/' => 'PhabricatorFileListController',
|
|
|
|
|
'upload/' => 'PhabricatorFileUploadController',
|
|
|
|
|
'dropupload/' => 'PhabricatorFileDropUploadController',
|
2012-10-05 16:06:16 -07:00
|
|
|
'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorFileDeleteController',
|
2012-10-01 14:05:12 -07:00
|
|
|
'info/(?P<phid>[^/]+)/' => 'PhabricatorFileInfoController',
|
|
|
|
|
'data/(?P<key>[^/]+)/(?P<phid>[^/]+)/.*'
|
|
|
|
|
=> 'PhabricatorFileDataController',
|
|
|
|
|
'proxy/' => 'PhabricatorFileProxyController',
|
2012-10-22 19:06:56 -07:00
|
|
|
'xform/(?P<transform>[^/]+)/(?P<phid>[^/]+)/(?P<key>[^/]+)/'
|
2012-10-01 14:05:12 -07:00
|
|
|
=> 'PhabricatorFileTransformController',
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|