One-off for nextcloud/android#2323
(sanchosk / scoopex: would sponsor; gallyamb 2026-09-08: Vivo rewrites the JPEG after bokeh).
UploadDelayPolicy is retry backoff (3.5 s), not file age. Auto-upload still runs as soon as the file appears, then "delete after upload" can yank it from the gallery. This gate skips until now - lastModified >= min_age. min_age 0 is today's behaviour.
No SLA. No warranty. No APK from this Linux box.
Copy FileAgeGate.kt next to AutoUploadWorker.kt. Before createUploadFileOperation:
val minAge = syncedFolder.minAgeMs // new SyncedFolder long, default 0
if (!FileAgeGate.isOldEnough(System.currentTimeMillis(), File(localPath).lastModified(), minAge)) {
continue // leave it for a later scan
}Same check in DeleteUploadedFileOperation so a 30-day setting keeps the photo on-device after a successful upload.
Settings strings the gate already parses: 0, 90s, 5m, 1h, 30d.
python3 test_file_age_gate.py → all tests passed. Fresh 1-minute photo with 5m is skipped; Vivo rewrite at t=now is skipped until 2m; 30d matches the storage case.
You offered to sponsor a delay. One-off 30 USDC on Base if this min-age gate is the slice: 0x89324980acaf83Bc065f1cE7A613BF43f9E5692d. PayPal/bank: say so on this GitHub issue (no secrets). Nothing else owed. No Play Store APK, no UI polish, no 30-day calendar picker unless newly paid.