diff --git a/app/routers/uploads.py b/app/routers/uploads.py index eb1d390..03538a7 100644 --- a/app/routers/uploads.py +++ b/app/routers/uploads.py @@ -10,7 +10,8 @@ from app.models.user import User router = APIRouter(prefix="/api/uploads", tags=["uploads"]) # Storage directory for uploaded images -STORAGE_DIR = Path("/home/shihaam/git/sarlink/mapmaker/storage/images") +# Use relative path from project root to work in both dev and production +STORAGE_DIR = Path(__file__).resolve().parent.parent.parent / "storage" / "images" STORAGE_DIR.mkdir(parents=True, exist_ok=True) # Allowed image types