Skip to content

fix: correct ingest file upload endpoint URL#530

Merged
jamiepine merged 1 commit intospacedriveapp:mainfrom
tomasmach:fix/ingest-upload-route
Apr 4, 2026
Merged

fix: correct ingest file upload endpoint URL#530
jamiepine merged 1 commit intospacedriveapp:mainfrom
tomasmach:fix/ingest-upload-route

Conversation

@tomasmach
Copy link
Copy Markdown
Contributor

Summary

  • The frontend uploadIngestFiles function was POSTing to /agents/ingest/upload, but the backend handler (upload_ingest_file) is registered at /agents/ingest/files — causing a silent 404 and "Upload failed" in the UI.
  • Fixed the frontend URL to match the backend route.

Verification

  • Backend route: #[utoipa::path(post, path = "/agents/ingest/files", ...)] in src/api/ingest.rs:113
  • Route registration: routes!(ingest::upload_ingest_file) in src/api/server.rs:155
  • Generated OpenAPI schema (schema.d.ts) has no /agents/ingest/upload path — confirms only /agents/ingest/files exists

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d1af3c2-01a5-4d2d-9a3f-1ad1009060f3

📥 Commits

Reviewing files that changed from the base of the PR and between 5c85557 and 5399f85.

📒 Files selected for processing (1)
  • interface/src/api/client.ts

Walkthrough

Updated the API endpoint URL for file uploads from /agents/ingest/upload to /agents/ingest/files in the client configuration, maintaining all request and response parameters unchanged.

Changes

Cohort / File(s) Summary
API Endpoint Update
interface/src/api/client.ts
Changed upload endpoint URL from POST /agents/ingest/upload to POST /agents/ingest/files, keeping request method, body format (FormData), and error handling consistent.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: correcting the ingest file upload endpoint URL from an incorrect path to the correct one.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the bug (mismatched frontend/backend URLs), the fix applied, and providing verification evidence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jamiepine jamiepine merged commit f7e9d87 into spacedriveapp:main Apr 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants