diff --git a/frontend/src/components/Toolbar.tsx b/frontend/src/components/Toolbar.tsx index 913594c..943d30f 100644 --- a/frontend/src/components/Toolbar.tsx +++ b/frontend/src/components/Toolbar.tsx @@ -49,6 +49,8 @@ export const Toolbar: React.FC = ({ if (file && onUploadStart) { onUploadStart(file); } + // Reset the input so the same file can be selected again + e.target.value = ''; }; return ( diff --git a/gateway/app/main.py b/gateway/app/main.py index e47d5e2..fad421f 100644 --- a/gateway/app/main.py +++ b/gateway/app/main.py @@ -1,6 +1,7 @@ """FastAPI app factory.""" from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware from app import __version__ from app.routers import documents, edits, health, render @@ -13,6 +14,14 @@ def create_app() -> FastAPI: description="Auth, metadata, storage, and job-queue gateway over the C++ PDF engine.", ) + app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], + ) + app.include_router(health.router) app.include_router(documents.router) app.include_router(render.router)