4 * Redirect to the current raw contents of a Paste.
6 * This controller provides a stable URI for getting the current contents of
7 * a paste, and slightly simplifies the view controller.
9 final class PhabricatorPasteRawController
10 extends PhabricatorPasteController
{
12 public function shouldAllowPublic() {
16 public function handleRequest(AphrontRequest
$request) {
17 $viewer = $request->getViewer();
18 $id = $request->getURIData('id');
20 $paste = id(new PhabricatorPasteQuery())
25 return new Aphront404Response();
28 $file = id(new PhabricatorFileQuery())
30 ->withPHIDs(array($paste->getFilePHID()))
33 return new Aphront400Response();
36 return $file->getRedirectResponse();