mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 14:23:44 +00:00
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.
21 lines
578 B
PHP
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');
|
|
}
|
|
}
|