"Server not found" when auto uploading photos in 3.26.0 + uploads to `/remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera`
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Configure auto upload to upload the photos to a specific remote folder, in my case `/Fotos/`
2. Auto upload worked fine in versions < 3.26.0, the photos were uploaded directly to that remote folder.
3. After upgrading to 3.26.0, the uploads fail with many notifications "Server not found".
4. Looking at the web server logs, I can see it's trying to upload them to the subfolder `/Fotos/storage/emulated/0/DCIM/camera/`, which doesn't exist and returns a 404:
```
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "HEAD /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_114543.jpg HTTP/1.1" 404 541 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "PUT /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_114543.jpg HTTP/1.1" 404 804 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "HEAD /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_122145.jpg HTTP/1.1" 404 541 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:15 +0000] "PUT /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_122145.jpg HTTP/1.1" 404 804 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
```
### Expected behaviour
All photos uploaded to `/Fotos`
### Actual behaviour
Tons of notifications in my phone about "Server not found" as it keeps retrying the upload again and again.
### Android version
13
### Device brand and model
Poco F3
### Stock or custom OS?
Stock
### Nextcloud android app version
3.26.0
### Nextcloud server version
27.1.0
### Using a reverse proxy?
Yes
### Android logs
_No response_
### Server error logs
_No response_
### Additional information
No logs from the android app. If really needed, I can get them.
Contributor guide
Assessment
This issue has not been assessed yet.