Changeset View
Changeset View
Standalone View
Standalone View
src/applications/macro/controller/PhabricatorMacroEditController.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
array( | array( | ||||
'name' => $request->getStr('name'), | 'name' => $request->getStr('name'), | ||||
'authorPHID' => $user->getPHID(), | 'authorPHID' => $user->getPHID(), | ||||
'isExplicitUpload' => true, | 'isExplicitUpload' => true, | ||||
'canCDN' => true, | 'canCDN' => true, | ||||
)); | )); | ||||
} else if ($uri) { | } else if ($uri) { | ||||
try { | try { | ||||
// Rate limit outbound fetches to make this mechanism less useful for | |||||
// scanning networks and ports. | |||||
PhabricatorSystemActionEngine::willTakeAction( | |||||
array($user->getPHID()), | |||||
new PhabricatorFilesOutboundRequestAction(), | |||||
1); | |||||
$file = PhabricatorFile::newFromFileDownload( | $file = PhabricatorFile::newFromFileDownload( | ||||
$uri, | $uri, | ||||
array( | array( | ||||
'name' => $request->getStr('name'), | 'name' => $request->getStr('name'), | ||||
'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | 'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | ||||
'isExplicitUpload' => true, | 'isExplicitUpload' => true, | ||||
'canCDN' => true, | 'canCDN' => true, | ||||
)); | )); | ||||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |