1.20.x stream_wrappers.inc BackdropPublicStreamWrapper::getExternalUrl()

Overrides getExternalUrl().

Return the HTML URI of a public file.

Overrides BackdropStreamWrapperInterface::getExternalUrl

File

includes/stream_wrappers.inc, line 931
Backdrop stream wrapper interface.

Class

BackdropPublicStreamWrapper
Backdrop public (public://) stream wrapper class.

Code

function getExternalUrl() {
  $path = str_replace('\\', '/', $this->getTarget());
  return $GLOBALS['base_url'] . '/' . self::getDirectoryPath() . '/' . backdrop_encode_path($path);
}