diff --git a/src/applications/config/check/PhabricatorSetupCheckStorage.php b/src/applications/config/check/PhabricatorSetupCheckStorage.php index dd2d009f3d..8834609b1a 100644 --- a/src/applications/config/check/PhabricatorSetupCheckStorage.php +++ b/src/applications/config/check/PhabricatorSetupCheckStorage.php @@ -3,6 +3,21 @@ final class PhabricatorSetupCheckStorage extends PhabricatorSetupCheck { protected function executeChecks() { + $upload_limit = PhabricatorEnv::getEnvConfig('storage.upload-size-limit'); + if (!$upload_limit) { + $message = pht( + 'The Phabricator file upload limit is not configured. You may only '. + 'be able to upload very small files until you configure it, because '. + 'some PHP default limits are very low (as low as 2MB).'); + + $this + ->newIssue('config.storage.upload-size-limit') + ->setShortName(pht('Upload Limit')) + ->setName(pht('Upload Limit Not Yet Configured')) + ->setMessage($message) + ->addPhabricatorConfig('storage.upload-size-limit'); + } + $local_path = PhabricatorEnv::getEnvConfig('storage.local-disk.path'); if (!$local_path) { return; diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index 376b95da4a..2db9a328ad 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -143,17 +143,17 @@ final class PhabricatorFilesConfigOptions "used to render text like 'Maximum file size: 10MB' on ". "interfaces where users can upload files, and files larger than ". "this size will be rejected. \n\n". - "Specify this limit in bytes, or using a 'K', 'M', or 'G' ". - "suffix.\n\n". - "NOTE: Setting this to a large size is **NOT** sufficient to ". + "NOTE: **Setting this to a large size is NOT sufficient to ". "allow users to upload large files. You must also configure a ". - "number of other settings. To configure file upload limits, ". + "number of other settings.** To configure file upload limits, ". "consult the article 'Configuring File Upload Limits' in the ". "documentation. Once you've configured some limit across all ". "levels of the server, you can set this limit to an appropriate ". "value and the UI will then reflect the actual configured ". - "limit.")) - ->addExample('10M', pht("Valid setting.")), + "limit.\n\n". + "Specify this limit in bytes, or using a 'K', 'M', or 'G' ". + "suffix.")) + ->addExample('10M', pht("Allow Uploads 10MB or Smaller")), $this->newOption('files.enable-imagemagick', 'bool', false) ->setBoolOptions( array(