feat: cleaned up tankopedia

This commit is contained in:
TresAbhi committed 2023-05-30 18:42:34 +00:00
1 parent 38fe4bf5da
commit c2fca42a86
14 files changed
+195 -96

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
export default async function URLToBase64(URL: string) {
const response = await fetch(URL);
const blob = await response.arrayBuffer();
const base64 = `data:${response.headers.get(
'content-type',
)};base64,${Buffer.from(blob).toString('base64')}`;
return base64;
}