Path: blob/master/src/applications/files/exception/PhabricatorFileUploadException.php
12242 views
<?php12final class PhabricatorFileUploadException extends Exception {34public function __construct($code) {5$map = array(6UPLOAD_ERR_INI_SIZE => pht(7"Uploaded file is too large: current limit is %s. To adjust ".8"this limit change '%s' in php.ini.",9ini_get('upload_max_filesize'),10'upload_max_filesize'),11UPLOAD_ERR_FORM_SIZE => pht(12'File is too large.'),13UPLOAD_ERR_PARTIAL => pht(14'File was only partially transferred, upload did not complete.'),15UPLOAD_ERR_NO_FILE => pht(16'No file was uploaded.'),17UPLOAD_ERR_NO_TMP_DIR => pht(18'Unable to write file: temporary directory does not exist.'),19UPLOAD_ERR_CANT_WRITE => pht(20'Unable to write file: failed to write to temporary directory.'),21UPLOAD_ERR_EXTENSION => pht(22'Unable to upload: a PHP extension stopped the upload.'),23);2425$message = idx(26$map,27$code,28pht('Upload failed: unknown error (%s).', $code));29parent::__construct($message, $code);30}31}323334