nextcloud / nextcloud/ios

When uploading full media library nextcloud takes enormous size of iPhone storage, creates a lot of duplicates, files with wrong date and 0-sized files

Open
#3,980 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce
  1. Large iPhone media library (mine is 14k photos ~124Gb)
  2. Start uploading full library
  3. Note: this library is auto-uploaded over several years, so almost all files are already on the server.
  4. Note2: as I have discovered some files were not auto-uploaded, so I have decided to force-upload full library; this is how this issue appeared
Expected behaviour

Library is uploaded to nextcloud

Actual behaviour
  1. Nextcloud starts to eat iPhone storage and eventually fails (crashes and cannot relaunch) at using 27+Gb when storage is full. Obviously, there is no need for nextcloud to take up so much space to upload
  2. A lot of duplicated files with different names created. E.g. I had one file with all correct metadata placed to year 1980, sometimes years are wrong, sometimes months, days, hours — no idea, why. Sometimes filename date is correct, but there is different random numerical suffix, e.g. "3495" and "39864873246" for duplicates.
  3. A lot of zero-size files created
Reasoning or why should it be changed/implemented?

This is one of key features. Essentially, initial upload of a large media library from phone is currently broken. Especially, if you're running out of space.

Environment data

iOS version: e.g. iOS 18.7.1

Nextcloud iOS app version: Nextcloud Matheria for iOS 7.2.3.7

Server operating system:
Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.12.34+rpt-rpi-2712
Architecture: arm64
I guess this is raspbian, as this is Pi5

Web server: Apache on nextcloud, nginx on my server + cloudflare

Database: pgsql, redis

PHP version: latest

Nextcloud version: Nextcloud Hub 25 Autumn (32.0.4)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing the upload with a large library whose files already exist on the server, then trace the iOS upload flow while monitoring local storage, duplicate names, dates, and zero-byte results. Done means the initial upload avoids unnecessary storage use and does not create duplicate, misdated, or empty files.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.