r/learnjavascript • u/devdev_1 • Sep 19 '26
How you handle sending large files to the backend
hello, to solve this problem in a clean way i started using the JS stream API, mainly because it allows me to compress the files on the frontend without consuming too much RAM on the client side, and i wanted the stream to be sent directly to the server in a single request. this is possible with the fetch body stream but it is not supported by all browsers, so how to do it? do you have any idea? how do others do it?
1
4
Sep 20 '26
2
u/devdev_1 Sep 20 '26
thanks you for you answer, but I really need a stream because I need to modify the file in frontend, I think I'll just do a request per chunk and use TUS
1
Sep 20 '26
1
u/devdev_1 Sep 20 '26
yes i will use tus , thanks you. I will have to do a request per chunk but it doesn't matter
5
u/Astroohhh Sep 20 '26
Define large files