Differential D12255 Diff 29455 src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
| )); | )); | ||||
| $file_phids = array(); | $file_phids = array(); | ||||
| foreach ($_FILES as $file_raw) { | foreach ($_FILES as $file_raw) { | ||||
| try { | try { | ||||
| $file = PhabricatorFile::newFromPHPUpload( | $file = PhabricatorFile::newFromPHPUpload( | ||||
| $file_raw, | $file_raw, | ||||
| array( | array( | ||||
| 'authorPHID' => $user->getPHID(), | 'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | ||||
| )); | )); | ||||
| $file_phids[] = $file->getPHID(); | $file_phids[] = $file->getPHID(); | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| phlog($ex); | phlog($ex); | ||||
| } | } | ||||
| } | } | ||||
| $received->setAttachments($file_phids); | $received->setAttachments($file_phids); | ||||
| $received->save(); | $received->save(); | ||||
| Show All 9 Lines | |||||