UNPKG

r2-explorer

Version:

A Google Drive Interface for your Cloudflare R2 Buckets

36 lines (30 loc) 749 B
import { ExecutionContext } from 'hono'; type BucketConfig = { publicUrl?: string; }; type R2ExplorerConfig = { readonly?: boolean; cors?: boolean; cfAccessTeamName?: string; dashboardUrl?: string; emailRouting?: | { targetBucket: string; } | false; showHiddenFiles?: boolean; basicAuth?: BasicAuth | BasicAuth[]; buckets?: Record<string, BucketConfig>; }; type AppEnv = { ASSETS: Fetcher; [key: string]: R2Bucket; }; declare function R2Explorer(config?: R2ExplorerConfig): { email(event: { raw: unknown; rawSize: unknown; }, env: AppEnv, context: ExecutionContext): Promise<void>; fetch(request: Request, env: unknown, context: ExecutionContext): Promise<Response>; }; export { R2Explorer };