mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-08 16:54:21 +00:00
Refactor common functions
This commit is contained in:
4
frontend/src/utils/fileHelpers.js
Normal file
4
frontend/src/utils/fileHelpers.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export const isImageFile = (filePath) => {
|
||||
const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.svg'];
|
||||
return imageExtensions.some((ext) => filePath.toLowerCase().endsWith(ext));
|
||||
};
|
||||
Reference in New Issue
Block a user