Media / foldkit-media/server

uploadPolicyAny

function · packages/media/src/server/upload.ts:226

function uploadPolicyAny<E, R>(
  ...policies: readonly [
    Layer.Layer<UploadPolicy, E, R>,
    Layer.Layer<UploadPolicy, E, R>,
    ...ReadonlyArray<Layer.Layer<UploadPolicy, E, R>>,
  ]
): Layer.Layer<UploadPolicy, E, R>

Policies tried in turn, the first to admit winning: a deployment's secret for scripts beside sessions for editors. A refusal tries the next; when every one refuses, the last refusal is the answer. Each is built once, with the combined layer, and closes with it.