added upload image directly to void.cat to image picker

This commit is contained in:
Ren Amamiya
2023-04-20 17:41:23 +07:00
parent 4a013ffb33
commit df2f6b0ce7
7 changed files with 339 additions and 50 deletions

View File

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