Skip to content

Add upload endpoint with validation#2

Merged
asabla merged 15 commits intomainfrom
codex/add-file-upload-with-validation
Jun 24, 2025
Merged

Add upload endpoint with validation#2
asabla merged 15 commits intomainfrom
codex/add-file-upload-with-validation

Conversation

@asabla
Copy link
Copy Markdown
Owner

@asabla asabla commented Jun 11, 2025

Summary

  • add /upload endpoint that validates file types and checks for empty files
  • test uploading valid PDFs
  • test rejecting invalid types and empty uploads

Testing

  • uv run python -m pytest -q

https://chatgpt.com/codex/tasks/task_e_684987cc0db08320881bf0ee8183a43e

@asabla asabla requested a review from Copilot June 11, 2025 13:46

This comment was marked as outdated.

@asabla asabla self-assigned this Jun 12, 2025
asabla and others added 13 commits June 24, 2025 12:38
I'm just going with the flow

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
I'm just going with the flow

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
I'm just going with the flow

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Just keeping things mean and clean
Not sure why codex is unable to handle this shit
@asabla asabla force-pushed the codex/add-file-upload-with-validation branch from 76aef1e to da2a999 Compare June 24, 2025 19:25
@asabla asabla requested a review from Copilot June 24, 2025 19:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an upload endpoint with validation along with additional health check functionality. Key changes include:

  • Adding the /upload endpoint to ensure file type, non-emptiness, and size limits.
  • Implementing a new /health endpoint using fastapi-health.
  • Updating tests, documentation, and CI workflows to support the new endpoints and validation rules.

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_main.py Added tests for health check and new upload endpoint behavior.
tests/conftest.py Configured sys.path for app module imports.
pyproject.toml Added fastapi-health dependency and new dev tooling (black, ruff).
app/main.py Added /health and /upload endpoints; updated /pdf/pages endpoint logic.
README.md Updated API documentation to reflect new endpoints.
.github/workflows/ci.yml Updated installation and linting steps for new dependencies.

Following what copilot thinks

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@asabla asabla merged commit 0dbf393 into main Jun 24, 2025
1 check passed
@asabla asabla deleted the codex/add-file-upload-with-validation branch June 24, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants