feat: add support for png

feat: add tests

chore: update dependencies
This commit is contained in:
Benjamin Nussbaum 2025-04-24 19:31:57 +02:00
parent f1fafe7ef0
commit b4dea89fad
6 changed files with 250 additions and 94 deletions

View file

@ -73,7 +73,15 @@ Route::get('/display', function (Request $request) {
$image_path = 'images/setup-logo.bmp';
$filename = 'setup-logo.bmp';
} else {
$image_path = 'images/generated/'.$image_uuid.'.bmp';
if (file_exists(storage_path('app/public/images/generated/'.$image_uuid.'.bmp'))) {
$image_path = 'images/generated/'.$image_uuid.'.bmp';
$filename = basename($image_path);
} elseif (file_exists(storage_path('app/public/images/generated/'.$image_uuid.'.png'))) {
$image_path = 'images/generated/'.$image_uuid.'.png';
$filename = basename($image_path);
} else {
$image_path = 'images/generated/'.$image_uuid.'.bmp';
}
$filename = basename($image_path);
}