general fixes & enhancements
This commit is contained in:
1 parent
e08853fe54
commit
31de8265d9
25 files changed
+561
-625
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export const getFileNameFromUrl = (url: URL): string => {
|
||||
const pathName = url.pathname.split('/').filter(Boolean).pop();
|
||||
if (!pathName) return url.hostname;
|
||||
try {
|
||||
return decodeURIComponent(pathName);
|
||||
} catch {
|
||||
return pathName;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user