Skip to content

Conversation

@Heisenberg-Vader
Copy link
Contributor

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature Enhancement: Adds support for multiple file uploads in a single request to the /api/store_attachment endpoint.

  • Why was this change needed? (You can also link to an open issue here)
    The backend previously allowed only a single document to be uploaded at a time, limiting usability for multi-file workflows. This update introduces support for multiple file uploads in one go, addressing the functionality gap discussed in
    🚀 Feature: Batch upload for attachments #2092

  • Other information:

    • Changes Made:
      • Modified post() method to handle multiple files using request.files.getlist("file")
      • Implemented individual file error handling - if one file fails, others continue processing
      • Added backward compatibility for single file uploads (maintains existing API contract)
      • Each file gets its own unique attachment_id and separate Celery task for processing
    • Testing:
      • Verified multiple file uploads work on the local machine
      • Confirmed single file uploads remain unchanged
      • Tested error handling when individual files fail

@vercel
Copy link

vercel bot commented Nov 1, 2025

@Heisenberg-Vader is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@ManishMadan2882
Copy link
Collaborator

I'm running into an issue when I try to execute npm run dev with these changes

4:13:00 AM [vite] (client) warning: Duplicate "multiple" attribute in JSX element
637|                  multiple
638|                  onChange={handleFileAttachment}
639|                  multiple />
   |                  ^
640|  
641|              </label>

  Plugin: vite:esbuild

When I removed the extra multiple attribute, another issue noticeable

Uncaught ReferenceError: uploadFiles is not defined
    at MessageInput (MessageInput.tsx:287:6)
    at Object.react_stack_bottom_frame (react-dom_client.js?v=a5ed387d:17424:20)
    at renderWithHooks (react-dom_client.js?v=a5ed387d:4206:24)
    at updateFunctionComponent (react-dom_client.js?v=a5ed387d:6619:21)
    at beginWork (react-dom_client.js?v=a5ed387d:7654:20)
    at runWithFiberInDEV (react-dom_client.js?v=a5ed387d:1485:72)
    at performUnitOfWork (react-dom_client.js?v=a5ed387d:10868:98)
    at workLoopSync (react-dom_client.js?v=a5ed387d:10728:43)
    at renderRootSync (react-dom_client.js?v=a5ed387d:10711:13)
    at performWorkOnRoot (react-dom_client.js?v=a5ed387d:10359:46)

Would you mind just double-checking your local setup to make sure the build is running smoothly?

@Heisenberg-Vader
Copy link
Contributor Author

Heisenberg-Vader commented Nov 3, 2025

Hey @ManishMadan2882!
Firstly, thank you for letting me know about the issue.
It appears to have been added in the code mistakenly, now it has been updated. You can try it out it again, it should now be working!

Also, there seems to have been a problem where I have removed the drag and drop functionality by mistake, I'll fix it real quick and make a commit. I apologize for such errors, its one of my first contributions.

@Heisenberg-Vader
Copy link
Contributor Author

Hey! I have fixed the issue of missing drag and drop functionality and have added it back.

Copy link
Collaborator

@ManishMadan2882 ManishMadan2882 left a comment

Choose a reason for hiding this comment

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

Perfect, Thankyou!

@vercel
Copy link

vercel bot commented Nov 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
oss-docsgpt Ready Ready Preview Comment Nov 3, 2025 0:47am

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.55%. Comparing base (6ae8d34) to head (af539a9).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
application/api/user/attachments/routes.py 0.00% 35 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2126      +/-   ##
==========================================
+ Coverage   43.34%   43.55%   +0.21%     
==========================================
  Files         140      140              
  Lines        9850     9883      +33     
==========================================
+ Hits         4269     4305      +36     
+ Misses       5581     5578       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dartpain dartpain merged commit 3789d2e into arc53:main Nov 3, 2025
8 of 10 checks passed
ManishMadan2882 pushed a commit that referenced this pull request Nov 5, 2025
#2126)

* Fixed multiple file uploads to be sent through a single request to backend for further processing and storing

* Fixed multiple file uploads to be sent through a single request to backend for further processing and storing

* Fixed multiple file uploads to be sent through a single request to backend for further processing and storing

* Made duplicate multiple keyword fixes

* Added back drag and drop functionality and it keeps the multiple file uploads
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.

3 participants