Skip to content

Commit

Permalink
Merge pull request #524 from tovam/patch-2
Browse files Browse the repository at this point in the history
Fix screenshot filename in FileInput.svelte
  • Loading branch information
eric-intuitem authored Jun 6, 2024
2 parents 6d72af5 + 5f630fd commit d8f199c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/lib/components/Forms/FileInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d8f199c

Please sign in to comment.