nextcloud / nextcloud/ios

Exclude reduced size media from automatic uploads

Open
#2,990 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Steps to reproduce

During the time a friend of mine is using my Nextcloud instance for photo storage the following problem has been seen multiple times.

When a user has multiple iOS devices which are syncing the camera roll it happens that the media files are uploaded from all devices to the Nextcloud server. This is not a problem until here even though one might question why the media is uploaded from each device.

If at least one of them is set to store media in reduced size it happens, that a former uploaded file in original size then is overwritten with the reduced size version in the Nextcloud. This is anoying and leads to loss of picture quality as older versions (in this case the original files) are purged after some time.

I'm not sure if the problem can be solved without the Nextcloud server being involved but as sure it can't be solved without the iOS app.

While it might be a solution to simply disable photo roll syncing this is not really a way to go for a normal user.

I'm not an iOS developer nor user but I think of a solution like this:

  • I assume that the camera roll must have a kind of metadata flag indicating if the media file is an original or reduced size file.
  • If so, this metadata flag must be included into metadata send to the Nextcloud server.
  • If a metadata flag as described exists, the Nextcloud server must not update/overwrite an existing file when a reduced size file is uploaded (it should check this with the metadata flag).
  • If the uploaded file is a reduced size file and is not existing so far on the Nextcloud server, it should be stored.
  • If the file is uploaded later in original size, the former reduced size version shall be replaced.

Is this possible?

Expected behaviour

Original size media files shall not be overwritten with reduced size versions.

Actual behaviour

Original size media files are overwritten with reduced size versions.

iOS version: all

Nextcloud iOS app version: current

Server operating system: Debian

Web server: nginx

Database: Postgres

Nextcloud version: Nextcloud commuity docker image, Nextcloud 28

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

The issue names no source files, tests, or implementation entry points. Start by tracing the iOS camera-roll upload flow and how the server handles an existing file, then determine whether reduced-size metadata is available; done means original media is not overwritten while reduced media can still be uploaded and later replaced by the original.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.