From 6e7c6973dd20eb1335fef46e7e3e3c396f0dc234 Mon Sep 17 00:00:00 2001 From: azeeee05 Date: Tue, 26 May 2026 15:54:49 +0530 Subject: [PATCH] connected fe and gateway --- frontend/src/components/Toolbar.tsx | 2 ++ gateway/app/main.py | 9 +++++++++ 2 files changed, 11 insertions(+) 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)