Closed GrosSacASac closed 2 years ago
content-length
in adv, so that's why it only accepts file & blobs with a known size property.so the way you would actually stream a file is that you would somehow get a File class from the filesystem that would stream the file for you.
the file class itself has a File.prototype.stream() method that we will call to read the file
so you wouldn't actually stream the file into a formdata, we read the data for you...
NodeJS is plaining on implementing a method to get Blob/Files from the filesystem somehow but in the meantime you would need something like: https://github.com/node-fetch/fetch-blob#blob-part-backed-up-by-filesystem
The File class is also constructible, so you can create files in memory
Thanks for the details
The following line:
I thought I would stream the file hello-world.txt