3 final class DiffusionDocumentController
extends DiffusionController
{
5 public function shouldAllowPublic() {
9 public function handleRequest(AphrontRequest
$request) {
10 $response = $this->loadDiffusionContext();
15 $drequest = $this->getDiffusionRequest();
17 $engine = id(new DiffusionDocumentRenderingEngine())
18 ->setRequest($request)
19 ->setDiffusionRequest($drequest)
20 ->setController($this);
22 $viewer = $this->getViewer();
23 $request = $this->getRequest();
24 $repository = $drequest->getRepository();
26 $file_phid = $request->getStr('filePHID');
28 $file = id(new PhabricatorFileQuery())
30 ->withPHIDs(array($file_phid))
33 return $engine->newErrorResponse(
35 'This file ("%s") does not exist or could not be loaded.',
39 $ref = id(new PhabricatorDocumentRef())
42 return $engine->newRenderResponse($ref);