src/file/Item.php
public function getLink($scheme = false)
    {
        return Url::toRoute(['/admin/file/download', 'id' => $this->getId(), 'hash' => $this->getHashName(), 'fileName' => $this->getName()], $scheme);
    }
public function getLink($scheme = false)
    {
        return Url::toRoute(['/admin/file/download', 'id' => $this->getId(), 'hash' => $this->getHashName(), 'fileName' => $this->getName()], $scheme);
    }
public function getLink ( $ scheme = false ) { return Url :: toRoute ( [ '/admin/file/download' , 'id' => $ this -> getId ( ) , 'hash' => $ this -> getHashName ( ) , 'fileName' => $ this -> getName ( ) ] , $ scheme ) ; }
Get the link to a file.

The is the most common method when implementing the file object. This method allows you to generate links to the request file. For
example you may want users to see the file (assuming its a PDF).

```php
echo '<a href="{Yii::$app->storage->getFile(123)->link}">Download PDF</a>'; // you could also us href instead in order to be more semantic.
```

The output of source is a url which is provided by a UrlRUle of the admin module and returns nice readable source links:

```
/file/<ID>/<HASH>/<ORIGINAL_NAME>.<EXTENSION>
```

which could look like this when fille up:

```
/public_html/en/file/123/e976e224/foobar.png
```

@return string The relative source url to the file inside the storage folder with nice Urls.
Get the link to a file .