import XNode from "@entity-access/server-pages/dist/html/XNode.js";
function renderFile({ filename = void 0, content = void 0, headers = void 0}) {
const contentType = headers["expect-content-type"];
if(/image/i.test(contentType)) {
return
;
}
if(/video/i.test(contentType)) {
const poster = content.replace(/\/webm[^\/]*\//ig, "/jpg(400)/");
return
;
}
return
{filename}
;
}
export default function encodeAttachments(attachments: { filename?, content?, headers?: any}[]) {
return