mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: cleaned up tankopedia
This commit is contained in:
1 parent
38fe4bf5da
commit
c2fca42a86
14 files changed
+195
-96
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user