Files
rubix-admin-panel/src/Components/Functions/FileNameAlter.jsx
2024-05-17 15:32:45 +05:30

10 lines
301 B
JavaScript

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 ;