Skip to content

Conversation

@1-leo
Copy link
Contributor

@1-leo 1-leo commented Dec 21, 2025

fixes: #211
dependent on: #332 (merge before)

This PR introduces file streaming so large files are not loaded entirely into memory.
Its non-breaking, old method signatures have not been altered.
Both the files usecase and blossom usecase have the new streaming methods.

  • file streaming
  • progress report (stream of progress values)
  • mirrorToServers()

@1-leo 1-leo self-assigned this Dec 21, 2025
@1-leo 1-leo added the enhancement New feature or request label Dec 21, 2025
@1-leo 1-leo added this to ndk-dev Dec 21, 2025
@1-leo 1-leo moved this to In Progress in ndk-dev Dec 21, 2025
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 81.96078% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.83%. Comparing base (07dfd2c) to head (9c74df7).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
.../data_layer/repositories/blossom/blossom_impl.dart 84.82% 17 Missing ⚠️
.../ndk/lib/data_layer/data_sources/http_request.dart 70.00% 12 Missing ⚠️
packages/ndk/lib/data_layer/io/file_io_native.dart 72.97% 10 Missing ⚠️
...s/ndk/lib/domain_layer/usecases/files/blossom.dart 87.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
+ Coverage   72.30%   72.83%   +0.52%     
==========================================
  Files         144      146       +2     
  Lines        5585     5808     +223     
==========================================
+ Hits         4038     4230     +192     
- Misses       1547     1578      +31     

☔ 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.

@1-leo 1-leo requested review from frnandu and nogringo January 24, 2026 10:51
@1-leo 1-leo marked this pull request as ready for review January 24, 2026 11:35
@nogringo
Copy link
Collaborator

Is it possible to cancel an upload ?

@1-leo
Copy link
Contributor Author

1-leo commented Jan 24, 2026

Is it possible to cancel an upload ?

for uploadFromFile yes, you can just cancel the returned stream .cancel()
for the in memory no

@1-leo 1-leo requested a review from nogringo January 28, 2026 09:27
@1-leo
Copy link
Contributor Author

1-leo commented Jan 28, 2026

  • add to demo app

Copy link
Collaborator

@frnandu frnandu left a comment

Choose a reason for hiding this comment

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

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

blossom support large file uploads

4 participants