Skip to content

fix: continue to the next File param after an array-src File param - #1569

Merged
Kart03 merged 6 commits into
developfrom
fix/array-src-file-params
Oct 22, 2026
Merged

Kart03 merged 6 commits into
developfrom
fix/array-src-file-params

Conversation

@Kart03

@Kart03 Kart03 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Context

When a form-data File param has an array src, the multi-file branch of addFormParamsFile called the outer presend done() instead of the eachSeries callback. The remaining File params of the request were never loaded and no warning was emitted, so a second File field went out as an empty part.

Summary

  • Call the series callback() in the multi-file branch (both the error path and the success path), so the next File param is loaded.
  • Add integration tests: two and three array-src fields, an unresolved array src followed by a later field (warns once, later file sent), a string/array/string mix, and an array followed by an empty array.

Breaking changes

None.

Dependencies

None.

Test plan

  • test/integration/file-uploads/multi-file-params.test.js: 5 tests. With the fix reverted all 5 fail; with it they pass.
  • The existing file-upload integration tests (35) and unit tests (571) pass.
  • The new tests post to postman-echo.com like the existing file-upload tests, so they need network.

…aram

The multi-file branch of the form-data file loader called the outer presend
done instead of the eachSeries callback, so File params after an array-src
one were never loaded and no warning was emitted.

Co-Authored-By: Claude <[email protected]>
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.72%. Comparing base (e0fafea) to head (72f4bb5).

❌ Your project check has failed because the head coverage (34.10%) is below the target coverage (35.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1569      +/-   ##
===========================================
+ Coverage    77.66%   77.72%   +0.06%     
===========================================
  Files           51       51              
  Lines         4369     4369              
  Branches      1234     1234              
===========================================
+ Hits          3393     3396       +3     
+ Misses         732      730       -2     
+ Partials       244      243       -1     
Flag Coverage Δ
integration 68.98% <100.00%> (+0.11%) ⬆️
legacy 34.10% <0.00%> (ø)
unit 47.01% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@appurva21 appurva21 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Kart03 Looks good. Can you add the Changelog for this?

@Kart03

Kart03 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@appurva21 Added the changelog entry under unreleased in CHANGELOG.yaml (a542929).

appurva21
appurva21 previously approved these changes Oct 21, 2026
@Kart03
Kart03 merged commit 6b4c942 into develop Oct 22, 2026
19 of 20 checks passed
@Kart03
Kart03 deleted the fix/array-src-file-params branch October 22, 2026 10:31
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.

3 participants