F+Foldkit Plus
HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Media

Guides

  • Overview
  • Choosing where images come from
  • Ownership of images, variants, and files
  • Preloading the largest image
  • Placeholders
  • Reading an image's facts
  • Variant spaces and revisions
  • Running the resizing server
  • Icons

API

  • foldkit-media
  • foldkit-media/browser
  • foldkit-media/icons
  • foldkit-media/server
  • foldkit-media/cloudflare
  • foldkit-media/sharp
  • foldkit-media/unpic
  • foldkit-media/vite

Open source, MIT
Foldkit 0.170 · Effect 4

Media / foldkit-media/server

fileLayer

function · packages/media/src/server/files.ts:313

function fileLayer(
  options: FileOptions,
): Layer.Layer<
  never,
  never,
  | Generator
  | HttpRouter
  | FileSystem
  | HttpPlatform
  | Path
  | FileStore
  | FileUploadPolicy
  | FileReadPolicy
>

The file routes as an Effect HTTP application, registered with the HttpRouter, needing a FileStore, a FileUploadPolicy and a FileReadPolicy, and Admission if one is given.

Previousfoldkit-media/server

Edit on GitHub ↗

This site is a Foldkit Plus application, rendered at build time with foldkit-ssr. Its source

FoldkitEffectGitHub

Menu

HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Media

Guides

  • Overview
  • Choosing where images come from
  • Ownership of images, variants, and files
  • Preloading the largest image
  • Placeholders
  • Reading an image's facts
  • Variant spaces and revisions
  • Running the resizing server
  • Icons

API

  • foldkit-media
  • foldkit-media/browser
  • foldkit-media/icons
  • foldkit-media/server
  • foldkit-media/cloudflare
  • foldkit-media/sharp
  • foldkit-media/unpic
  • foldkit-media/vite

Open source, MIT
Foldkit 0.170 · Effect 4