File size: 491 Bytes
5484978
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Pre-upload diagnostics: verify Supabase / MinIO config without ingesting a PDF.
"""
from fastapi import APIRouter

from app.services.object_storage import storage_debug_snapshot

router = APIRouter(prefix="/debug", tags=["Debug"])


@router.get("/storage")
def debug_storage():
    """
    Check storage provider, import, client, bucket existence, and root file listing.
    Call this before POST /upload-pdf/ to verify Supabase is reachable.
    """
    return storage_debug_snapshot()