mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Implement case-insensitive matching for file extensions (#3570)
Enable case-insensitive matching when determining file extensions in the application. This enhancement ensures that the system accurately recognizes and processes file extensions regardless of the case used in the filenames.
This commit is contained in:
parent
33c3d6f5d4
commit
9366961d02
@ -71,7 +71,7 @@ export const supportedExtensions = {
|
|||||||
|
|
||||||
export function getFileExtension(fileName: string): string | null {
|
export function getFileExtension(fileName: string): string | null {
|
||||||
if (fileName) {
|
if (fileName) {
|
||||||
const match = fileName.match(/\.([^\./\?\#]+)($|\?|\#)/);
|
const match = fileName.toLowerCase().match(/\.([^\./\?\#]+)($|\?|\#)/);
|
||||||
|
|
||||||
return match ? match[1] : null;
|
return match ? match[1] : null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user