nextcloud / nextcloud/android

Manual File Upload Option Creates duplicate files

Open
#14,494 2 comments 2 reactions 1 assignee Claimed by @alperozturk96 View on GitHub
bug
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

Manually upload a file from gallery to a specific directory on Nextcloud.
After the upload is completed multiple copies were saved locally on the device in following paths:

- internalstorage/Android/media/com.nextcloud.client/nextcloud/user@nextcloud.server.domain/filepath mapping to server
- internalstorage/Android/media/com.nextcloud.client/nextcloud/tmp/user@nextcloud.server.domain/filepath mapping to server

e.g.:
* Document is: `IMG20250110_10000.jpg`
* Server: `nextcloud.example.com:443`
* Server Path for upload: `Photos/S21Plus/2025/01/IMG20250110_10000.jpg`
Files are duplicated across following paths:
- `internalstorage/Android/media/com.nextcloud.client/nextcloud/user@nextcloud.example.com%3A443/Photos/S21Plus/2025/01/IMG20250110_10000.jpg`
- `internalstorage/Android/media/com.nextcloud.client/nextcloud/tmp/user@nextcloud.example.com%3A443/Photos/S21Plus/2025/01/IMG20250110_10000.jpg`

### Expected behaviour

Files should not be duplicated multiples times on the device.
Only keep original file locally.

### Actual behaviour

Files getting duplicated multiple times locally, leading to device running out of storage.
While failing to upload further files due to lack of local storage.

### Android version

14

### Device brand and model

Samsung S21+

### Stock or custom OS?

Stock

### Nextcloud android app version

3.30.8 (Jan 20, 2025)

### Nextcloud server version

30.0.5

### Using a reverse proxy?

I don't know

### Android logs

_No response_

### Server error logs

```bash

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.