Files
coolify/app/Http/Controllers/ProjectIconController.php
Andras Bacsai fd5eb3e0cd feat(project): add icons and improve persistent volume management
Add project icon storage and serving with local/S3 support, prevent deletion of compose-managed volumes, and optimize volume backups. Refine project and backup UI components with consistent styling and coverage.
2026-08-13 22:56:52 +02:00

21 lines
578 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Project;
use App\Services\ProjectIconStorageService;
use Illuminate\Http\Response;
class ProjectIconController extends Controller
{
public function __invoke(string $project_uuid, ProjectIconStorageService $iconStorage): Response
{
$project = Project::ownedByCurrentTeam()->where('uuid', $project_uuid)->firstOrFail();
$contents = $iconStorage->projectContents($project);
abort_if($contents === null, 404);
return response($contents)->header('Content-Type', 'image/jpeg');
}
}