Files
rubix-admin-panel/src/Components/Functions/FileNameAlter.jsx

10 lines
301 B
React
Raw Normal View History

2024-05-17 15:32:45 +05:30
const extractFilename = (filePath) => {
console.log(filePath);
// Use the split method to break the path into parts based on '/'
const parts = filePath.split('/');
// Return the last part, which is the filename
return parts[parts.length - 1];
};
export default extractFilename ;