diff --git a/paragraphs_browser.module b/paragraphs_browser.module index 0a96987..fa2e454 100644 --- a/paragraphs_browser.module +++ b/paragraphs_browser.module @@ -9,6 +9,7 @@ use Drupal\paragraphs\Entity\ParagraphsType; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\paragraphs_browser\Entity\BrowserType; +use Drupal\Core\StreamWrapper\StreamWrapperManager; /** * Implements hook_help(). @@ -164,7 +165,7 @@ function paragraphs_browser_image_path_validate($path) { return $path; } // Prepend 'public://' for relative file paths within public filesystem. - if (\Drupal::service('file_system')->uriScheme($path) === FALSE) { + if (StreamWrapperManager::getScheme($path) === FALSE) { $path = 'public://' . $path; } if (is_file($path)) {