Auto-upload: with "delete from camera roll" active, photos that are already present on the server are not deleted from the camera roll
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #4395 của @mvanhorn — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Start in NCAutoUpload.swift around autoUploadBackgroundSync at line 376, then trace removeUploadedAssetsIfNeeded and the handling of a successful PROPFIND. Reproduce with existing server photos and remove_photo_CameraRoll enabled; done means those already-present assets are removed from the camera roll without changing the handling of upload errors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- reinstall app with pictures (previously uploaded to the server) still present on the camera roll (for whatever reason, see #4307, #4306 for instance)
- setup app for automatic uploading, "new_photos_only" not set, and "remove_photo_CameraRoll" set
- maintain app in foreground with a good connection (test setup: iPhone and server on the same LAN)
- wait for upload termination
Expected behaviour
I believe these files should be deleted from the camera roll (at least that's the exact reason I reinstalled the app)
Actual behaviour
Out of more than 600 files, only 58 got deleted (including videos that were not uploaded because of #4304 ).
Analysis
When a photo is found in the camera roll, autoUploadBackgroundSync (NCAutoUpload.swift:376) will PROPFIND the server, with 3 outcomes
.errorCode == 404: extract and upload file- other errors (503, 401, 423, ...): do nothing, we'll see on next pass
.success: file exists, deletes the local asset row -> this is where the decision is made to not delete the file
Note: the existence check is only based on the name of the file. In my case, with default _filenamemask_ and _autoupload_create_subfolder_ set, there is a very thin chance this could cause collisions, so it's fine. Perhaps other users may encounter issues -- and perhaps changing this is way too costly..
A remark: a few more logs could help better diagnose the auto-upload system, such as upload successes, photos deletion requests (removeUploadedAssetsIfNeeded), logging getCameraRollAssets filtered vs unfiltered counts, etc.
let unfilteredCount = collections.reduce(0) { $0 + PHAsset.fetchAssets(in: $1, options: nil).count }
nkLog(tag: self.global.logTagBgSync,
message: "getCameraRollAssets: collections=\(collections.count), filteredCount=\(allAssets.count), unfilteredLibraryCount=\(unfilteredCount)",
minimumLogLevel: .verbose)
Logs
issue-existing-photos-not-deleted-1.txt
Reasoning or why should it be changed/implemented?
Like I said, IMHO the app should not make the difference between a file that is already there and one that has just been uploaded, so the setting "remove_photo_CameraRoll" should apply to both. Plus, with current auto-upload issues, that would have given me an workaround to clean my camera roll ;). Right now, though, I can safely clear my camera roll
Environment data
iOS version: iOS 18.7
Nextcloud iOS app version: 35.0.0.8
Server operating system: Nextcloud AIO 14.1.1
Web server: Nextcloud AIO 14.1.1
Database: Nextcloud AIO 14.1.1
PHP version: Nextcloud AIO 14.1.1
Nextcloud version: 34.0.4
- Ngôn ngữ chính
- Swift
- Star
- 2.5k
- Fork
- 1k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/ios
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Modify action only shown in context menuCó thể đã có người làm @mpivchev đã nhận 17 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nextcloud/ios#4332 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
i18n: Change text stringĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/ios
Issue tương tự
-
area: build-and-ci possible-duplicate S3: minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
manaflow-ai/cmux#38889 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[New Rule] expo-modules-jsiĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
LibChecker/LibChecker-Rules#1453 ·
-
Add screenshots to the READMEĐang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
triage me type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MasterJ93/ATProtoKit#344 ·