@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 14 lines 563 Bytes
Raw
1 import type { AsyncWorkerEnv } from "./stack.ts";
2
3 /**
4 * Async (non-Effect) Worker fixture for the Cloudflare Images binding declared
5 * via `env: { MEDIA: Cloudflare.Images.Images(...) }`. `InferEnv` maps the marker to
6 * the native `cf.ImagesBinding`, so the handler calls `env.MEDIA.info(...)`
7 * directly with the request body's `ReadableStream`.
8 */
9 export default {
10 async fetch(request: Request, env: AsyncWorkerEnv): Promise<Response> {
11 const info = await env.MEDIA.info(request.body!);
12 return Response.json({ mode: "async", ...info });
13 },
14 };