Media / foldkit-media/server
FileReadPolicy
class · packages/media/src/server/files.ts:63
class FileReadPolicy extends Context.Service<
FileReadPolicy,
{
readonly resolve: (
request: HttpServerRequest.HttpServerRequest,
) => Effect.Effect<FileReader, FileUnauthenticated>
}
>()('foldkit-media/FileReadPolicy') {}Who may read which file, asked before the store is read: resolve says who
is asking from the request alone, never the key, and answers what they may
read. Build it with fileReadPolicy.
In the guides
- Running the resizing serverMedia / foldkit-media