Skip to content

refactor(upload-file-operation): local file transfers - #18084

Open
alperozturk96 wants to merge 6 commits into
masterfrom
refactor/upload-file-operation-move-file-related-operation
Open

alperozturk96 wants to merge 6 commits into
masterfrom
refactor/upload-file-operation-move-file-related-operation

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • Move copy, move and copyFile out of UploadFileOperation.java into a new class UploadLocalFileTransfer.
  • Copy with a 64 KiB buffer instead of 4 KiB. Streams close via use {}.
  • A missing parent folder or a null content:// stream now returns an error instead of throwing a NullPointerException.
  • Adds Log every success and failure path.
  • Fixes the leak in internal files/nextcloud/tmp/, and it's now deleted when the upload finishes. It's kept on a conflict, because "Keep local" re-uploads from that path.
  • Add unit tests in UploadLocalFileTransferTest.

How to test?

  1. Copy: use "+" → "Upload content from other apps" and pick a file.
  2. Move: use "+" → "Upload files" → "Move file to Nextcloud folder".

@alperozturk96
alperozturk96 force-pushed the refactor/upload-file-operation-move-file-related-operation branch from 4ec0b10 to a5a01fd Compare November 19, 2026 10:59
@alperozturk96 alperozturk96 added this to the Nextcloud App 35.2.0 milestone Nov 19, 2026
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.86792% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...droid/operations/upload/UploadLocalFileTransfer.kt 70.52% 22 Missing and 6 partials ⚠️
...ncloud/android/operations/UploadFileOperation.java 54.54% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

…ileOperation

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
…l tmp/ and points mFile at that copy. Neither the normal nor the encrypted upload path knew about it, so nothing ever deleted it, fixing via this

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96
alperozturk96 force-pushed the refactor/upload-file-operation-move-file-related-operation branch from b3cf513 to 936ee6c Compare November 20, 2026 11:07
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 936ee6c
Version 18084
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@github-actions

Copy link
Copy Markdown

SpotBugs

CategoryBaseNew
Bad practice2424
Correctness4545
Dodgy code119118
Experimental11
Malicious code vulnerability11
Multithreaded correctness1313
Performance2521
Security1515
Total243238

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant