'Take file as input from frontend & createReadStream of that file

I'm taking a file as input.

If I send the file data using file reader, then fs.createReadStream() cannnot read it. How cam I send it to backend & use fs.createReadStream() on it, or is there any other method to read stream at frontend only?

My use case is I need to sent a file to jenkins job. I'm able to achieve this if I select file using fs.createReadStream(File Directory), but this only works at backend when I provide absolute path. I need to user to input file & then process it at backend(probably stream it), & then sent it to jenkin job.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source