src/GoogleStorageAdapter.php
public function getUrl($path)
    {
        $uri = rtrim($this->storageApiUri, '/');
        $path = $this->applyPathPrefix($path);

        // Only prepend bucket name if no custom storage uri specified
        // Default: "https://storage.googleapis.com/{my_bucket}/{path_prefix}"
        // Custom: "https://example.com/{path_prefix}"
        if ($this->getStorageApiUri() === self::STORAGE_API_URI_DEFAULT) {
            $path = $this->bucket->name() . '/' . $path;
        }

        return $uri . '/' . $path;
    }
public function getUrl($path)
    {
        $uri = rtrim($this->storageApiUri, '/');
        $path = $this->applyPathPrefix($path);

        // Only prepend bucket name if no custom storage uri specified
        // Default: "https://storage.googleapis.com/{my_bucket}/{path_prefix}"
        // Custom: "https://example.com/{path_prefix}"
        if ($this->getStorageApiUri() === self::STORAGE_API_URI_DEFAULT) {
            $path = $this->bucket->name() . '/' . $path;
        }

        return $uri . '/' . $path;
    }
public function getUrl ( $ path ) { $ uri = rtrim ( $ this -> storageApiUri , '/' ) ; $ path = $ this -> applyPathPrefix ( $ path ) ; // Only prepend bucket name if no custom storage uri specified // Default: "https://storage.googleapis.com/{my_bucket}/{path_prefix}" // Custom: "https://example.com/{path_prefix}" if ( $ this -> getStorageApiUri ( ) === self :: STORAGE_API_URI_DEFAULT ) { $ path = $ this -> bucket -> name ( ) . '/' . $ path ; } return $ uri . '/' . $ path ; }
Return a public url to a file.

Note: The file must have `AdapterInterface::VISIBILITY_PUBLIC` visibility.

@param string $path

@return string
Return a public url to a file .