diff --git a/apps/web/src/lib/media-bytes.ts b/apps/web/src/lib/media-bytes.ts
new file mode 100644
index 0000000..6135512
--- /dev/null
+++ b/apps/web/src/lib/media-bytes.ts
@@ -0,0 +1,218 @@
+import { useEffect, useState } from "react";
+import { selectedSpaceId, withSpaceHeaders } from "./rpc";
+
+/*
+ * Media byte routes (thumbnails, proxies, render files, bundles, upload chunks).
+ * They need the session cookie and the space header, which an `
` or
+ * `