fix: strip trailing dashes from filename ref (26774-.HEIC -> 26774)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 17:24:44 +02:00
parent 31b764f458
commit 42ef490196
+3 -1
View File
@@ -48,7 +48,9 @@ function reducer(state: ImageItem[], action: Action): ImageItem[] {
function refFromFilename(filename: string): string {
const dot = filename.lastIndexOf('.')
return dot === -1 ? filename : filename.slice(0, dot)
const base = dot === -1 ? filename : filename.slice(0, dot)
// Supprime les tirets/espaces/underscores en fin de nom (ex: "26774-" → "26774")
return base.replace(/[-_\s]+$/, '')
}
function blobToBase64(blob: Blob): Promise<string> {