MCPcopy
hub / github.com/epicweb-dev/epic-stack / img

Function img

tests/db-utils.ts:104–116  ·  view source on GitHub ↗
({
	altText,
	filepath,
}: {
	altText?: string
	filepath: string
})

Source from the content-addressed store, hash-verified

102}
103
104export async function img({
105 altText,
106 filepath,
107}: {
108 altText?: string
109 filepath: string
110}) {
111 return {
112 altText,
113 contentType: filepath.endsWith('.png') ? 'image/png' : 'image/jpeg',
114 blob: await fs.promises.readFile(filepath),
115 }
116}
117
118let _migrationSqls: Array<Array<string>> | undefined
119async function getMigrationSqls() {

Callers 3

seedFunction · 0.90
getNoteImagesFunction · 0.85
getUserImagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected