3 final class PhabricatorFileDocumentController
4 extends PhabricatorFileController
{
6 public function shouldAllowPublic() {
10 public function handleRequest(AphrontRequest
$request) {
11 $engine = id(new PhabricatorFileDocumentRenderingEngine())
12 ->setRequest($request)
13 ->setController($this);
15 $viewer = $request->getViewer();
17 $file_phid = $request->getURIData('phid');
19 $file = id(new PhabricatorFileQuery())
21 ->withPHIDs(array($file_phid))
24 return $engine->newErrorResponse(
26 'This file ("%s") does not exist or could not be loaded.',
30 $ref = id(new PhabricatorDocumentRef())
33 return $engine->newRenderResponse($ref);