Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/PhabricatorFile.php
| Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | public function save() { | ||||
| } | } | ||||
| return parent::save(); | return parent::save(); | ||||
| } | } | ||||
| public function getMonogram() { | public function getMonogram() { | ||||
| return 'F'.$this->getID(); | return 'F'.$this->getID(); | ||||
| } | } | ||||
| public function scrambleSecret() { | |||||
| return $this->setSecretKey($this->generateSecretKey()); | |||||
| } | |||||
| public static function readUploadedFileData($spec) { | public static function readUploadedFileData($spec) { | ||||
| if (!$spec) { | if (!$spec) { | ||||
| throw new Exception(pht('No file was uploaded!')); | throw new Exception(pht('No file was uploaded!')); | ||||
| } | } | ||||
| $err = idx($spec, 'error'); | $err = idx($spec, 'error'); | ||||
| if ($err) { | if ($err) { | ||||
| throw new PhabricatorFileUploadException($err); | throw new PhabricatorFileUploadException($err); | ||||
| ▲ Show 20 Lines • Show All 1,226 Lines • Show Last 20 Lines | |||||