UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 592 B
import{resolveMediaKeyTenant as e}from"../../utils/media/media-key-tenant.mjs";import t from"../media/checks/check-has-media-strategy.mjs";const n=async(n,r)=>{let i=await t(n);if(i.error)return i;let a=await i.data.stream(n,{key:r.mediaKey,range:r.range,tenant:e(n.config,r.mediaKey)});return a.error?a:{error:void 0,data:{key:r.mediaKey,contentLength:a.data.contentLength,contentType:a.data.contentType,body:a.data.body,etag:a.data.etag,isPartialContent:a.data.isPartialContent,totalSize:a.data.totalSize,range:a.data.range}}};export{n as default}; //# sourceMappingURL=stream-media.mjs.map