Upload Error Due to Duplicate File Names with Custom File Name Format
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
I am Japanese and not very proficient in English, so I apologize if there are any mistakes in my writing. Thank you for your understanding.
Steps to reproduce
- Enable automatic upload settings in the Nextcloud iOS app.
- Set the file name mask to "YY-MM-DD HH-mm-ss".
- Upload multiple files created at the same date and time, where the 5th to 8th characters of the file name are the same. (For example, files created on January 1, 2024, at 10:00:15 with file names like "20240101100015-0001" and "20240101100015-0002".)
Expected behaviour
File names should not duplicate, uploads should occur without errors, and files should not be overwritten.
Actual behaviour
File names duplicate, causing upload errors and resulting in file versioning where files are overwritten.
Screenshots
- Photographs of the subject 1
- Photographs of the subject 2
- Upload Screen
- upload error
Upload file 423: WebDAV Locked: Trying to access locked resource - Overwritten and versioned
Logs
If a large number of files are affected by this event, a file lock is performed and logging is generated on the server side.
FileLocked
"Photos/24-01-01 00-00-00 0001.jpg" is locked, existing lock on file: 2 shared locks
Reasoning or why should it be changed/implemented?
In the current setting, when photos or videos taken from other media or downloaded from LINE are uploaded, the 5th to 8th characters of the file name are used, causing files taken on the same date and time to have the same name, resulting in upload errors. This reduces user convenience. It would be helpful if the original file name could be used when the file name format is specified, or if the original file name could be used when the prefix is not "IMG_".
Environment data
iOS version: iOS 17.5.1
Nextcloud iOS app version: 5.3.1.2
Server operating system: AlmaLinux 9.4 (Seafoam Ocelot)
Web server: Apache
Database: MariaDB version: 10.5.22
PHP version: 8.2.14
Nextcloud version: Nextcloud Hub 8 (29.0.2)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue through the iOS app's automatic upload settings with the "YY-MM-DD HH-mm-ss" file name mask and same-timestamp files. Trace the upload file-name handling and verify that generated names remain unique, uploads do not fail with a 423 lock error, and files are not overwritten or versioned unexpectedly.
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
- Mostly clear
- Newbie friendliness
- 35/100