replace void.cat with nostr.build

This commit is contained in:
Ren Amamiya
2023-09-05 12:46:00 +07:00
parent 4019623d99
commit 2389ad5fdc
8 changed files with 120 additions and 44 deletions

View File

@@ -1,6 +1,8 @@
import { readBinaryFile } from '@tauri-apps/api/fs';
export async function createBlobFromFile(path: string): Promise<Blob> {
export async function createBlobFromFile(path: string): Promise<Uint8Array> {
const file = await readBinaryFile(path);
return new Blob([file]);
const blob = new Blob([file]);
const arr = new Uint8Array(await blob.arrayBuffer());
return arr;
}