Skip to content

Commit 95030ed

Browse files
committed
More updates for file url generation
1 parent b3a9c99 commit 95030ed

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/AssetApiServiceBase.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ public function __construct(FileUrlGeneratorInterface $file_url_generator) {
2727
* Get basic information from a file.
2828
*/
2929
public function getFileData($file) {
30+
31+
$uri = $file->getFileUri();
32+
$url = $this->fileUrlGenerator->generateAbsoluteString($uri);
33+
3034
$data = [
31-
'uri' => $file->getFileUri(),
32-
'url' => $file->url(),
33-
'relativePath' => $this->getRelativePath($file->url()),
35+
'uri' => $uri,
36+
'url' => $url,
37+
'relativePath' => $this->getRelativePath($url),
3438
];
3539

3640
return $data;

0 commit comments

Comments
 (0)