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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user