import { readAsObjectURL } from "https://deno.land/x/ayonli_jsext@v0.9.72/reader.ts";
Reads all data from the given source to an object URL.
Examples
Example 1
Example 1
import { readAsObjectURL } from "@ayonli/jsext/reader";
const file = new File(["Hello, World!"], "hello.txt", { type: "text/plain" });
const objectURL = await readAsObjectURL(file, file.type);
console.log(objectURL); // e.g. blob:http://localhost:8080/7b8e7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d