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 <noreply@anthropic.com>
This commit is contained in:
@@ -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') || '/';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user