android icon indicating copy to clipboard operation
android copied to clipboard

Auto-upload menu shows only files in folder but also uploads subfolders

Open markweberdev opened this issue 1 year ago • 3 comments

⚠️ Before posting ⚠️

  • [x] This is a bug, not a question or an enhancement.
  • [x] I've searched for similar 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.

Steps to reproduce

  1. Select a folder for auto-upload, e.g. /storage/emulated/0/DCIM/Camera.
  2. Configure a remote folder, e.g. /Photos/ .
  3. Select "use subfolders"
  4. Subfolder option: Year/Month
  5. Select another folder for auto-upload, e.g. /storage/emulated/0/DCIM.
  6. Configure a remote folder, e.g. /Photos/ .
  7. Select "use subfolders"
  8. Subfolder option: Year/Month

Expected behaviour

All new photos and videos are uploaded to the remote folder + subfolder. In my case: /Photos/{Year}/{Month}/

The photos and videos that are uploaded should correspond to the the ones I can see in the auto-upload configuration menu. If the overview only shows and counts files in the folder itself, files from subfolders should not uploaded. Especially since the subfolders are listed as separate items in the auto-upload menu.

Actual behaviour

All new photos and videos are uploaded to two remote folders:

  1. /Photos/{Year}/{Month}/
  2. /Photos/{Year}/{Month}/Camera

Image

Android version

15

Device brand and model

Pixel 8a

Stock or custom OS?

Stock

Nextcloud android app version

3.30.7

Nextcloud server version

29.0.4

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs


Additional information

  • As I recently switched to subfolders and Pixel 8a, I'm unsure how long the issue is present.
  • When migrating data from one phone to another, the internal data path for the camera can vary, which can lead to subfolders under /storage/emulated/0/DCIM. As the root folder as well as all subfolders are listed as separate folders in auto-upload with the number of files in each folder excluding subfolders, it is non-intuitive that subfolders will be uploaded, too (i.e. upload of duplicates).
  • Potentially related to https://github.com/nextcloud/android/issues/11127.
  • I would like to express my gratitude to the nextcloud devs for giving us this app.

markweberdev avatar Jan 07 '25 21:01 markweberdev

Thank you for getting in touch with us and reporting this problem.

As far as I can tell, auto upload is working as expected. If you set up two different auto upload folders, these will independently upload all files. As the second auto upload folder contains the first, any files within the first will be uploaded twice.

The Nextcloud app treats each auto upload folder independently and does not check for duplicates across folders.

To resolve this issue, I would recommend removing or disabling one of the auto upload folders. Please be sure to check that new pictures are still uploaded as you expect.

ZetaTom avatar Jan 08 '25 10:01 ZetaTom

Thanks for getting back. I see your point, I would argue that this behaviour is non-intuitive for the user. It took me quite some time to figure out why this is happening. So if this behaviour is intended, could it maybe be made more transparent to the user?

If the folder preview in the auto-upload menu suggests that there are 12 photos/videos, I assume these 12 would be uploaded (but not everything in every subfolder). Alternatively, when enabling a folder for auto-upload, a message saying this folder is part of an already configured auto-upload folder could be a real saver.

markweberdev avatar Jan 09 '25 09:01 markweberdev

@markweberdev, we have discussed this issue further in our team and came up with some improvements. We have opened a new issue to keep track of our progress: #14462. We will close this issue in favour of this new one. Feel free to review our plans and comment.

ZetaTom avatar Jan 24 '25 09:01 ZetaTom