nextcloud / nextcloud/ios

Upload: File modified datetime is changed during upload

Open
#1,343 20 comments 6 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

Expected behaviour

iOS photos to be uploaded with correct date time

Actual behaviour

Uploaded file datetime seems to be using the modified date, and the modified date seems to be changing to current time during upload.
Tested it by uploading several photos from my iPhone from different years, for example:

  • Uploaded a photo from 2018, this is what I am getting on PHP:
    • X-OC-MTime: 1594328285.316689 - This was the exactly time of the upload like if the photo was changed during the upload process(?)
    • X-OC-CTime: 1537457032.4036608 - This is the time the photo was shooted, and I think this should be the time the file should have inside Nextcloud.
Steps to reproduce

Just upload a photo from other day than today.

Reasoning or why should it be changed/implemented?

So we can have photos displayed in correct order.

iOS version

13.5.1

App version

3.0.1

Server configuration

Operating system:
Debian
Web server:
nginx
Database:
MariaDB
PHP version:
7.3
Nextcloud version: (see Nextcloud admin page)
19

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 at the iOS photo upload flow and inspect how the photo's capture date is mapped to X-OC-MTime and X-OC-CTime. Reproduce with photos from different years and verify that the uploaded file preserves its original capture datetime rather than the upload time.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.