diff --git a/src/services/S3SecureDownloadsService.php b/src/services/S3SecureDownloadsService.php index d316aa5..ad0ed1d 100644 --- a/src/services/S3SecureDownloadsService.php +++ b/src/services/S3SecureDownloadsService.php @@ -32,7 +32,7 @@ public function getSignedUrl( $asset_id ) { // https://stackoverflow.com/a/9339669/864799 $urlPrefix = rtrim( $assetSettings['subfolder'], "/" ) . "/"; - $baseAssetPath = $urlPrefix . $fileName; + $baseAssetPath = $urlPrefix . $asset['folderPath'] . $fileName; $keyId = Craft::parseEnv($assetSettings['keyId']); $secretKey = Craft::parseEnv($assetSettings['secret']);