Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

279 B
Raw Blame
export function isVideoStorageKey(
	video: { id: string; ownerId: string },
	key: string,
) {
	return (
		key.startsWith(`${video.ownerId}/${video.id}/`) &&
		!key.includes("\\") &&
		key
			.split("/")
			.every((part) => part.length > 0 && part !== "." && part !== "..")
	);
}