Skip to content

Add Title to the DB when uploading a file. #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
taichan03 opened this issue Apr 30, 2025 · 1 comment
Open

Add Title to the DB when uploading a file. #274

taichan03 opened this issue Apr 30, 2025 · 1 comment
Assignees

Comments

@taichan03
Copy link
Collaborator

taichan03 commented Apr 30, 2025

Summary
When a user uploads a document via the UploadFile page, the backend should automatically extract the document title (if available) and populate the title field in the database. Currently, this field is being saved as null.

Current Behavior

  • Uploaded files are saved successfully.
  • The title column in the database remains null.

Expected Behavior

  • Upon file upload, the server should:
  1. Parse the document.
  2. Attempt to extract a meaningful title (e.g., from the PDF metadata, first page header, or first large/bold line).
  3. Save the extracted title to the corresponding database entry.

Backend Details

Code location: server/API/views/uploadfile.py

This logic should be added during the upload process after the file has been saved and parsed.

Suggestion: Use openAI API endpoint and sent in the first 50 words of the document and ask it to extract the document title.
https://balancertestsite.com/UploadFile
https://balancertestsite.com/listoffiles

Image

Image

@taichan03 taichan03 moved this to Backlog in Balancer Apr 30, 2025
@taichan03 taichan03 moved this from Backlog to In Progress in Balancer Apr 30, 2025
@ricanontherun ricanontherun moved this from In Progress to Feature Ready for Review in Balancer Jun 9, 2025
@ricanontherun
Copy link

#301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Feature Ready for Review
Development

No branches or pull requests

2 participants