mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-14 21:26:15 -08:00
refactor: add utils function to get video extension
This commit is contained in:
1 parent
ac78962bd4
commit
b7975dba8b
1 file changed
+4
@@ -88,3 +88,7 @@ export const createPlaylistObject = (
|
||||
...(uploadType === 'FILE' ? { filePath: urlOrPath } : {}),
|
||||
};
|
||||
};
|
||||
|
||||
export const getExtensionFromUrl = (url: string) => {
|
||||
return url.split(/[#?]/)[0].split('.').pop().trim();
|
||||
};
|
||||
Reference in new issue
Block a user