Skip to content

fix: resolve PDF upload failures#65

Closed
overhyped-pratham wants to merge 1 commit into
FireFistisDead:masterfrom
overhyped-pratham:fix/upload-error
Closed

fix: resolve PDF upload failures#65
overhyped-pratham wants to merge 1 commit into
FireFistisDead:masterfrom
overhyped-pratham:fix/upload-error

Conversation

@overhyped-pratham
Copy link
Copy Markdown

Summary

  • Use a stable repo-root uploads/ path via __dirname so Express and the RAG service read the same file regardless of process working directory.
  • Restore Zod askSchema / summarizeSchema exports and validation responses expected by the API tests.
  • Relax multer PDF detection to rely on the .pdf extension (fixes browsers that send application/octet-stream).
  • Repair invalid package.json (missing comma) and add the zod dependency.

Test plan

  • npm test (14/14 passing)
  • Start RAG service (uvicorn on port 5000) and Express (node server.js on port 4000)
  • Upload a PDF from the frontend and confirm session_id is returned
  • Ask a question against the uploaded document

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added backend Express or API gateway work type:bug Something isn't working feature A new feature or improvement fix A targeted fix or cleanup frontend Frontend-related work invalid This doesn't seem right question Further information is requested rag-service FastAPI / model service work type:testing labels May 19, 2026
@FireFistisDead
Copy link
Copy Markdown
Owner

@overhyped-pratham can't accept without issue generatioin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Express or API gateway work feature A new feature or improvement fix A targeted fix or cleanup frontend Frontend-related work invalid This doesn't seem right question Further information is requested rag-service FastAPI / model service work type:bug Something isn't working type:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants