Skip to content

feat(upload): merge upload related API from @nextcloud/upload#1509

Merged
susnux merged 11 commits intomainfrom
feat/merge-uploader
Mar 12, 2026
Merged

feat(upload): merge upload related API from @nextcloud/upload#1509
susnux merged 11 commits intomainfrom
feat/merge-uploader

Conversation

@susnux
Copy link
Copy Markdown
Contributor

@susnux susnux commented Feb 19, 2026

As it was decided to move UI to the vue library it is easier to move the pure API to this library.
Reducing libraries to maintain and also it fits nicely into this libraries scope.

See individual commits - its mostly copy paste and slight adjustments to fit the shape of this library.

@susnux susnux added type: enhancement 🚀 New feature or request 2. developing 2️⃣ Work in progress labels Feb 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 52.04545% with 211 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.47%. Comparing base (c19d771) to head (2c4eb92).
⚠️ Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
lib/upload/uploader/Uploader.ts 44.08% 124 Missing and 13 partials ⚠️
lib/upload/utils/upload.ts 3.03% 32 Missing ⚠️
lib/upload/utils/fileTree.ts 26.31% 24 Missing and 4 partials ⚠️
lib/upload/utils/conflicts.ts 0.00% 6 Missing ⚠️
lib/upload/utils/filesystem.ts 0.00% 3 Missing ⚠️
lib/upload/utils/config.ts 80.00% 1 Missing and 1 partial ⚠️
lib/upload/errors/UploadCancelledError.ts 66.66% 1 Missing ⚠️
lib/upload/uploader/Eta.ts 98.41% 0 Missing and 1 partial ⚠️
lib/upload/uploader/Upload.ts 97.14% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1509       +/-   ##
===========================================
- Coverage   86.05%   72.47%   -13.59%     
===========================================
  Files          30       40       +10     
  Lines         667     1108      +441     
  Branches      195      274       +79     
===========================================
+ Hits          574      803      +229     
- Misses         80      272      +192     
- Partials       13       33       +20     

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

susnux added 11 commits March 9, 2026 16:43
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/merge-uploader branch from 2ba1041 to 2c4eb92 Compare March 10, 2026 16:07
@susnux susnux marked this pull request as ready for review March 10, 2026 18:20
@susnux susnux added 3. to review 3️⃣ Waiting for reviews and removed 2. developing 2️⃣ Work in progress labels Mar 10, 2026
Comment thread lib/upload/uploader/Eta.ts
Copy link
Copy Markdown
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

Thanks for splitting into commits 💙

Only one comment

Comment thread lib/upload/getUploader.ts
* @param isPublic Set to true to use public upload endpoint (by default it is auto detected)
* @param forceRecreate Force a new uploader instance - main purpose is for testing
*/
export function getUploader(isPublic: boolean = isPublicShare(), forceRecreate = false): Uploader {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I always wonder if we should not auto detect the public boolean. What if an app creates a normal instance and the other a public without forceCreate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes we should!

but lets do changes in separate PRs this PR is mainly for copy it over and adjust code to work in this repo

@susnux susnux merged commit ebc4815 into main Mar 12, 2026
12 of 14 checks passed
@susnux susnux deleted the feat/merge-uploader branch March 12, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review 3️⃣ Waiting for reviews type: enhancement 🚀 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflicting library version

3 participants