Skip to content

Commit ee7bf4a

Browse files
committed
Handle Asset Volumes that use aliases
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
1 parent bd9f3a3 commit ee7bf4a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/services/Transcode.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Transcode extends Component
8383
* @param $videoOptions array of options for the video
8484
*
8585
* @return string URL of the transcoded video or ""
86+
* @throws Exception
8687
*/
8788
public function getVideoUrl($filePath, $videoOptions): string
8889
{
@@ -201,6 +202,7 @@ public function getVideoUrl($filePath, $videoOptions): string
201202
* @param $thumbnailOptions array of options for the thumbnail
202203
*
203204
* @return string URL of the video thumbnail
205+
* @throws Exception
204206
*/
205207
public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
206208
{
@@ -262,6 +264,7 @@ public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
262264
* @param $audioOptions array of options for the audio file
263265
*
264266
* @return string URL of the transcoded audio file or ""
267+
* @throws Exception
265268
*/
266269
public function getAudioUrl($filePath, $audioOptions): string
267270
{
@@ -357,6 +360,7 @@ public function getAudioUrl($filePath, $audioOptions): string
357360
* @param bool $summary
358361
*
359362
* @return array
363+
* @throws Exception
360364
*/
361365
public function getFileInfo($filePath, $summary = false): array
362366
{
@@ -427,6 +431,7 @@ public function getFileInfo($filePath, $summary = false): array
427431
* @param $videoOptions
428432
*
429433
* @return string
434+
* @throws Exception
430435
*/
431436
public function getVideoFilename($filePath, $videoOptions): string
432437
{
@@ -451,6 +456,7 @@ public function getVideoFilename($filePath, $videoOptions): string
451456
* @param $audioOptions
452457
*
453458
* @return string
459+
* @throws Exception
454460
*/
455461
public function getAudioFilename($filePath, $audioOptions): string
456462
{
@@ -478,6 +484,7 @@ public function getAudioFilename($filePath, $audioOptions): string
478484
* @param $options
479485
*
480486
* @return string
487+
* @throws Exception
481488
*/
482489
protected function getFilename($filePath, $options)
483490
{
@@ -539,7 +546,7 @@ protected function getAssetPath($filePath): string
539546
$filePath = $sourcePath . $folderPath . $asset->filename;
540547
}
541548

542-
return $filePath;
549+
return Craft::getAlias($filePath);
543550
}
544551

545552
/**

0 commit comments

Comments
 (0)