coollabsio/coolify · error · RuntimeException

Unable to store the project icon.

Error message

Unable to store the project icon.

What it means

Error "Unable to store the project icon." thrown in coollabsio/coolify.

Source

Thrown at app/Services/ProjectIconStorageService.php:20

namespace App\Services;

use App\Models\Project;
use Illuminate\Http\UploadedFile;
use RuntimeException;

class ProjectIconStorageService extends AvatarStorageService
{
    public function storeProject(Project $project, UploadedFile $upload): void
    {
        $settings = instanceSettings();
        $storageType = $settings->avatar_storage_type === 's3' && $settings->avatar_s3_storage_id ? 's3' : 'local';
        $s3StorageId = $storageType === 's3' ? $settings->avatar_s3_storage_id : null;
        $disk = $this->disk($storageType, $s3StorageId);
        $path = "project-icons/{$project->uuid}/icon.jpg";

        if (! $disk->put($path, $this->compress($upload))) {
            throw new RuntimeException('Unable to store the project icon.');
        }

        $oldStorageType = $project->icon_storage_type;
        $oldS3StorageId = $project->icon_s3_storage_id;
        $oldPath = $project->icon_path;

        $project->forceFill([
            'icon_path' => $path,
            'icon_storage_type' => $storageType,
            'icon_s3_storage_id' => $s3StorageId,
        ])->save();

        if ($oldPath && ($oldStorageType !== $storageType || $oldS3StorageId !== $s3StorageId)) {
            $this->disk($oldStorageType ?? 'local', $oldS3StorageId)->delete($oldPath);
        }
    }

    public function projectContents(Project $project): ?string

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/ProjectIconStorageService.php:20 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/279bf2da52da6e08. Report an issue: GitHub.