feat(seeder): update FiestaTradicionArrufoSeeder to use AVIF image format and validate image existence
This commit is contained in:
parent
c90a393081
commit
03bb7709c4
|
|
@ -20,7 +20,7 @@ class FiestaTradicionArrufoSeeder extends Seeder
|
|||
{
|
||||
private const TITLE = '26.º Fiesta de la Tradición y 4.º Encuentro de Agrupaciones Gauchas';
|
||||
|
||||
private const IMAGE = __DIR__.'/assets/fiesta-tradicion-arrufo-2026.png';
|
||||
private const IMAGE = 'images/tennants/onticket/events/fiesta-tradicion-arrufo-2026.avif';
|
||||
|
||||
public function __construct(
|
||||
private readonly CatalogService $catalog,
|
||||
|
|
@ -107,6 +107,12 @@ class FiestaTradicionArrufoSeeder extends Seeder
|
|||
|
||||
private function image(): UploadedFile
|
||||
{
|
||||
return new UploadedFile(self::IMAGE, basename(self::IMAGE), 'image/png', null, true);
|
||||
$path = public_path(self::IMAGE);
|
||||
|
||||
if (! is_file($path)) {
|
||||
throw new RuntimeException("Image not found at path: {$path}");
|
||||
}
|
||||
|
||||
return new UploadedFile($path, basename($path), 'image/avif', null, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 786 KiB |
Binary file not shown.
Loading…
Reference in New Issue