From 32801852cb33100dcec304769ea049bdc62d0132 Mon Sep 17 00:00:00 2001 From: kamaji Date: Sat, 7 Feb 2026 05:17:52 -0600 Subject: [PATCH] Add milliseconds to photo filenames to prevent overwrites Filenames now include milliseconds (e.g. kamaji_20260207_143022347.jpg) so rapid consecutive captures don't produce identical names and overwrite each other on Nextcloud. Co-Authored-By: Claude Opus 4.6 --- app/templates/capture.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/templates/capture.html b/app/templates/capture.html index 2d48009..4b31417 100644 --- a/app/templates/capture.html +++ b/app/templates/capture.html @@ -551,7 +551,8 @@ async function savePhoto(jpegBlob) { String(now.getDate()).padStart(2, '0') + '_' + String(now.getHours()).padStart(2, '0') + String(now.getMinutes()).padStart(2, '0') + - String(now.getSeconds()).padStart(2, '0'); + String(now.getSeconds()).padStart(2, '0') + + String(now.getMilliseconds()).padStart(3, '0'); const filename = currentUsername + '_' + timestamp + '.jpg'; const targetPath = localStorage.getItem('nextsnap_upload_path') || '/';