mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: add support for png
feat: add tests chore: update dependencies
This commit is contained in:
parent
f1fafe7ef0
commit
b4dea89fad
6 changed files with 250 additions and 94 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue