refactor: add utils function to get video extension

This commit is contained in:
4gray committed 2023-07-09 22:00:09 +02:00
1 parent ac78962bd4
commit b7975dba8b
1 file changed
+4
+4
View File
@@ -88,3 +88,7 @@ export const createPlaylistObject = (
...(uploadType === 'FILE' ? { filePath: urlOrPath } : {}),
};
};
export const getExtensionFromUrl = (url: string) => {
return url.split(/[#?]/)[0].split('.').pop().trim();
};