coollabsio/coolify · error · RuntimeException

Unable to store the profile picture.

Error message

Unable to store the profile picture.

What it means

Error "Unable to store the profile picture." thrown in coollabsio/coolify.

Source

Thrown at app/Services/AvatarStorageService.php:24

use App\Models\User;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use RuntimeException;

class AvatarStorageService
{
    public function store(User $user, 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 = "avatars/{$user->id}/avatar.jpg";
        $contents = $this->compress($upload);

        if (! $disk->put($path, $contents)) {
            throw new RuntimeException('Unable to store the profile picture.');
        }

        $oldStorageType = $user->avatar_storage_type;
        $oldS3StorageId = $user->avatar_s3_storage_id;
        $oldPath = $user->avatar_path;

        $user->update([
            'avatar_path' => $path,
            'avatar_storage_type' => $storageType,
            'avatar_s3_storage_id' => $s3StorageId,
        ]);

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

    public function contents(User $user): ?string

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/AvatarStorageService.php:24 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/f2ef81a740cf18c8. Report an issue: GitHub.