DenoDDeno
Powered by
CodyCC
Denoβ€’2y agoβ€’
19 replies
CodyC

How to open a file as blob?

Docs for Blob (https://deno.land/api@v1.42.0?s=Blob) say that
File
File
implements
Blob
Blob
. But the docs for Deno.File (https://deno.land/api@v1.42.0?s=Deno.File) say that it's deprecated and you should use FsFile instead. But FsFile (https://deno.land/api@v1.42.0?s=Deno.FsFile) doesn't implement Blob.

I could probably write my own wrapper that will make FsFile conform to Blob, but that feels like something that might already be in std somewhere?

(update: the important part here is that I want to wrap a file-like object, not read the entire file's contents into memory, since I'm working with potentially large files.)
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

How to transform a Readable Stream to a file.
.Literfieber..Literfieber / help
4y ago
How can i return a base64 as file on Deno Deploy?
Attacler/BartAAttacler/Bart / help
4y ago
How to check if stdin is a file?
m4rc3l05Mm4rc3l05 / help
2y ago