Skip to content

Add DisposeUploadStream option to keep upload stream open (#340)#382

Merged
AndreyVMarkelov merged 1 commit into
mainfrom
fix/340-upload-stream-dispose
Jul 8, 2026
Merged

Add DisposeUploadStream option to keep upload stream open (#340)#382
AndreyVMarkelov merged 1 commit into
mainfrom
fix/340-upload-stream-dispose

Conversation

@AndreyVMarkelov

Copy link
Copy Markdown
Contributor

Fixes #340.

UploadAsync always disposed the caller's stream as a hidden side effect. Added DropboxClientConfig.DisposeUploadStream (default true, so existing behavior is unchanged); set it to false to keep the stream open after upload.

Non-breaking: only touches hand-written files, no interface or generated-code changes.

Tests: one asserts the default still disposes, one asserts the stream stays open when the option is false (reproduced the ObjectDisposedException before the fix).

UploadAsync always disposed the caller's stream. Add
DropboxClientConfig.DisposeUploadStream (default true, preserving current
behavior); set false to keep the stream open. Add tests for both modes.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.35%. Comparing base (c25d774) to head (5d3b1c1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
+ Coverage   54.09%   54.35%   +0.26%     
==========================================
  Files          16       16              
  Lines        1403     1411       +8     
  Branches      134      135       +1     
==========================================
+ Hits          759      767       +8     
  Misses        604      604              
  Partials       40       40              
Flag Coverage Δ
integration 50.88% <100.00%> (+0.28%) ⬆️
unit 10.48% <0.00%> (-0.06%) ⬇️

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.

@AndreyVMarkelov AndreyVMarkelov merged commit 473811f into main Jul 8, 2026
20 of 22 checks passed
@AndreyVMarkelov AndreyVMarkelov deleted the fix/340-upload-stream-dispose branch July 8, 2026 16:23
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.

DropbboxClient Upload closes Stream

2 participants