-
Notifications
You must be signed in to change notification settings - Fork 0
Standardize fetch calls to file:
URLs
#5
Comments
I agree. I think this should be a normative optional extension of whatever work we do here, because some runtimes (Node) may not want to enable The main topics I think need to be covered:
Notes on Deno's implemenation of |
Having built a CORS proxy server myself using the fetch api then i would argue that i wouldn't at least want to allow the user to fetch local files and doing something like: if i would want to read files from the file system then i would have used the file system api. outdate - About getting Files from fs - Resolved (but not in Deno)but i would rather want to have something like: `new Response(fs.fileFrom(path))` that way `content-length` & `content-type` would be added as a header (as fetch could understand this parts from `file.size` & `file.type` Gettings files from the filesystem is also an important feature that I wish to exist if you ever wish to upload a file togheter with FormData. That was half of the reason why I wanted to get https://github.com/denoland/deno/pull/10969 landed in Deno so that we eventually could have some way of gettings files from the file system and adding it into FormData and `new Response(blob)` and so that we could read files using the standard `file.stream(), file.arrayBuffer(), file.text()`btw, there is also the possibility of |
For reference, Node.JS landing an implementation of fetch that doesn’t support |
This worked briefly in
then stopped working in Using
and in Deno deno 1.38.3 (release, x86_64-unknown-linux-gnu). |
The WHATWG Fetch spec says this regarding fetching of URLs using the
file:
protocol:That'd be nice to have a standard way for handling those.
The text was updated successfully, but these errors were encountered: