Pārlūkot izejas kodu

Updates file download URL

Updates the file download URL to use the public API endpoint.

This change ensures that files are served through the appropriate public route, enhancing security and accessibility.
Olivier Massot 5 mēneši atpakaļ
vecāks
revīzija
1015bc19bc
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/Service/File/Storage/ApiLegacyStorage.php

+ 1 - 1
src/Service/File/Storage/ApiLegacyStorage.php

@@ -44,7 +44,7 @@ class ApiLegacyStorage implements FileStorageInterface
      */
     public function getImageUrl(File $file, string $size, bool $relativePath, bool $uncropped = false): string
     {
-        $url = sprintf('api/files/%s/download/%s?relativePath=1', $file->getId(), $size);
+        $url = sprintf('api/public/files/%s/download/%s?relativePath=1', $file->getId(), $size);
 
         if ($uncropped) {
             $url .= '&noCache=true';