I've managed to upload files in chunk from a client to a server, but now i want to achieve the opposite way. Unfortunately the documentation on the offical module page lacks for this part.
I want to do the following:
- emit a stream and 'download'-event with the filename to the server
- the server should create a readstream and pipe it to the stream emitted from the client
- when the client reaches the stream, a download-popup should appear and ask where to save the file
The reason why i don't wanna use simple file-hyperlinks is obfuscating: the files on the server are encrpted and renamed, so i have to decrypt and rename them for each download request.
Any code snippets around to get me started with this?
This is a working example I'm using. But somehow (maybe only in my case) this can be very slow.