This commit is contained in:
2026-04-14 18:04:18 +08:00
parent f213fc6d8b
commit b8a921022b
2 changed files with 10 additions and 5 deletions

View File

@@ -14,6 +14,5 @@ export async function listDirectory(path: string, options?: FileOptions[]): Prom
}
export async function previewImage(path: string, options?: FileOptions[]): Promise<Uint8Array> {
const bytes: number[] = await invoke("preview_image", { path, options: options ?? null });
return new Uint8Array(bytes);
return await invoke("preview_image", { path, options: options ?? null });
}