export async function fileToDataURL(file) {
const arrayBuffer = await file.arrayBuffer();
const uintArray = new Uint8Array(arrayBuffer);
const binaryString = uintArray.reduce((acc, byte) => acc + String.fromCharCode(byte), "");
const base64String = btoa(binaryString);
const mimeType = file.type || "application/octet-stream";
return `data:${mimeType};base64,${base64String}`;
}