Skip to content

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Sep 29, 2025

  • Tests written, or not not needed

Issue

When the user presses Cancel during an upload, the ongoing or pending upload must be properly cancelled and reflected in the upload list.

Scenarios

  • From Notification:
    When the user presses the cancel button in the notification, the ongoing upload should stop immediately.

  • From Upload List Screen:
    When the user cancels from the upload list, the corresponding upload should also be stopped.

Expected Behavior

  • The upload operation is cancelled gracefully.
  • The cancellation reason is recorded.
  • Cancelled uploads must be visible in the upload list (marked as cancelled).

How to Test

  1. Start a file upload.
  2. Cancel from the notification → upload should stop and appear as cancelled in the upload list.
  3. Start another upload.
  4. Cancel from the upload list screen → upload should stop and appear as cancelled in the upload list.


// need to update now table in mUploadsStorageManager,
// since the operation will not get to be run by FileUploader#uploadFile
uploadsStorageManager.removeUpload(accountName, remotePath)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tobiasKaminsky Why do we have two different place for uploads?

ProviderTableMeta.UPLOADS_TABLE_NAME and CONTENT_URI_UPLOADS

@alperozturk96 alperozturk96 force-pushed the fix/cancel-upload branch 2 times, most recently from 36a27de to 4d30858 Compare September 30, 2025 12:40
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.34

Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Copy link

github-actions bot commented Oct 6, 2025

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15712.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

github-actions bot commented Oct 6, 2025

Codacy

Lint

TypemasterPR
Warnings4546
Errors1111

SpotBugs

CategoryBaseNew
Bad practice4646
Correctness7474
Dodgy code268268
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3535
Performance4949
Security1818
Total500500

Lint increased!

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