From 5f630fd4f974c0e58296d88bd0677d30e56f627c Mon Sep 17 00:00:00 2001 From: tovam Date: Thu, 6 Jun 2024 11:40:01 +0200 Subject: [PATCH] Fix screenshot filename in FileInput.svelte --- frontend/src/lib/components/Forms/FileInput.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/Forms/FileInput.svelte b/frontend/src/lib/components/Forms/FileInput.svelte index b0ca2db3c..164cd6d4c 100644 --- a/frontend/src/lib/components/Forms/FileInput.svelte +++ b/frontend/src/lib/components/Forms/FileInput.svelte @@ -38,7 +38,9 @@ if (extension === null) return null; // We could implement some contextual data in the filename (for example the evidence name or the name of an object this evidence is related to etc...) const date = new Date(); - return `${date.getDay()}-${date.getMonth()}-${date.getFullYear()}_${date.getHours()}-${date.getMinutes()}-${date.getSeconds()}_${date.getMilliseconds()}.${extension}`; + return `${date.getDate()}-${ + date.getMonth() + 1 + }-${date.getFullYear()}_${date.getHours()}-${date.getMinutes()}-${date.getSeconds()}_${date.getMilliseconds()}.${extension}`; } function onPaste(event: ClipboardEvent) {