diff -u b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php --- b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -30,6 +30,12 @@ return $GLOBALS['base_url'] . '/' . self::getDirectoryPath() . '/' . drupal_encode_path($path); } + /** + * Returns the base path for public:// + * + * @return string + * the base path for public:// typically sites/default/files. + */ static public function basePath() { $base_path = settings()->get('file_public_path', conf_path() . '/files'); if ($test_prefix = drupal_valid_test_ua()) {