Attachment/AttachmentHandler.php
public function getFileUrl($key)
    {
        $fileKey = $this->getFileKey($key);
        $storage = $this->getStorage($fileKey->getStorageName());
        
        if (!$storage->hasBaseUrl())
        {
            throw new MissingStorageConfigException('This storage does not have a configured base url!');
        }
        
        return $storage->getBaseUrl().'/'.$this->getStoragePath($storage, $fileKey);
    }
public function getFileUrl($key)
    {
        $fileKey = $this->getFileKey($key);
        $storage = $this->getStorage($fileKey->getStorageName());
        
        if (!$storage->hasBaseUrl())
        {
            throw new MissingStorageConfigException('This storage does not have a configured base url!');
        }
        
        return $storage->getBaseUrl().'/'.$this->getStoragePath($storage, $fileKey);
    }
public function getFileUrl ( $ key ) { $ fileKey = $ this -> getFileKey ( $ key ) ; $ storage = $ this -> getStorage ( $ fileKey -> getStorageName ( ) ) ; if ( ! $ storage -> hasBaseUrl ( ) ) { throw new MissingStorageConfigException ( 'This storage does not have a configured base url!' ) ; } return $ storage -> getBaseUrl ( ) . '/' . $ this -> getStoragePath ( $ storage , $ fileKey ) ; }
Get the URL for the given file key.

@throws InvalidKeyException              if the key cannot be parsed
@throws StorageDoesNotExistException     if the storage defined by the key is unknown
@throws MissingStorageConfigException    if the storage config for the key's storage does not contain a base url

@param string $key

@return $string
Get the URL for the given file key .