File Server
Concepts
- Use Deno.open to read a file's content in chunks.
- Transform a Deno file into a ReadableStream.
- Use Deno's integrated HTTP server to run your own file server.
Overview
Sending files over the network is a common requirement. As seen in the Fetch Data example, because files can be of any size, it is important to use streams in order to prevent having to load entire files into memory.