nextcloud / nextcloud/ios

Photo Auto upload "Maintain original filename" not working correctly

Open
#2,177 1 comment 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

Some photos that are saved by different apps to the camera roll do not preserve their original filename when being uploaded by the photo "Auto upload" feature with "Maintain original filename" enabled.

I notice this most commonly with images saved to the camera roll by Whatsapp, which names files using a hashed signature in the form "hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh" where all the "h" characters are a hexadecimal digit. I can verify within the camera roll that they are named that way (swiping up on the photo to view the photo details, which shows the name), but when that file is uploaded by the auto-upload feature, they get saved with a name that makes them look like a normal taken photo, something like "IMG_3414.JPG".

This is not specific to Whatsapp, it happens with other apps too, I just focus on Whatsapp because it is very easy to reproduce.

Steps to reproduce
  1. Save a photo received in Whatsapp to your camera roll.
  2. Go to "Photos" app and view the photo details, and see the name is a string of hex numbers
  3. Open Nextcloud app (with auto upload and "Maintain original filename" enabled, and let it auto-upload the saved photo
  4. Go to the nextcloud auto-upload directory and see that it is not named what the camera roll says it should be
Expected behaviour

The upload should preserve the original filename, as it says it will.

Actual behaviour

The file is saved with the wrong name.

Environment data

iOS version: 15.6.1

Nextcloud iOS app version: 4.4.2.0

Server operating system: Debian 11.5 x64

Web server: Apache

Database: MariaDB

PHP version: 7.4

Nextcloud version: 22.2.10

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

Start by reproducing the auto-upload with a photo saved from WhatsApp whose camera-roll name is a hexadecimal string, using the iOS app's “Maintain original filename” setting. Trace how the auto-upload feature obtains and assigns the filename; done means the uploaded file keeps the camera-roll filename rather than an IMG_####.JPG-style name.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.