3 final class PhabricatorFileUploadException
extends Exception
{
5 public function __construct($code) {
7 UPLOAD_ERR_INI_SIZE
=> pht(
8 "Uploaded file is too large: current limit is %s. To adjust ".
9 "this limit change '%s' in php.ini.",
10 ini_get('upload_max_filesize'),
11 'upload_max_filesize'),
12 UPLOAD_ERR_FORM_SIZE
=> pht(
13 'File is too large.'),
14 UPLOAD_ERR_PARTIAL
=> pht(
15 'File was only partially transferred, upload did not complete.'),
16 UPLOAD_ERR_NO_FILE
=> pht(
17 'No file was uploaded.'),
18 UPLOAD_ERR_NO_TMP_DIR
=> pht(
19 'Unable to write file: temporary directory does not exist.'),
20 UPLOAD_ERR_CANT_WRITE
=> pht(
21 'Unable to write file: failed to write to temporary directory.'),
22 UPLOAD_ERR_EXTENSION
=> pht(
23 'Unable to upload: a PHP extension stopped the upload.'),
29 pht('Upload failed: unknown error (%s).', $code));
30 parent
::__construct($message, $code);