Files
HiveGrid-Wireframes/hivegrid-cloud/apps/web/app/utils/helpers/MediaHelper.ts
T

12 lines
361 B
TypeScript

import { EmailAttachment } from "@toolctrl/db/prisma-browser";
import { MediaDto } from "~/application/dtos/entities/MediaDto";
export function getAttachmentToMedia(attachment: EmailAttachment): MediaDto {
return {
title: attachment.name,
name: attachment.name,
file: attachment.publicUrl ?? attachment.content,
type: attachment.type,
};
}