I have a golang backend with gin. Its supposed to work as a proxy for a ftp server that contains audiofiles. So my client should be able to call the endpoint /download/filepath the Golang application is then supposed to fetch the file from a ftp server and return it as a file(no stream).
My current solution is to read the file from the ftp as []byte and temporarily write it to disk with ioutil.TempFile() and return that file with ctx.File().
If possible I would like to skip the step where I'm creating a tempfile. Is that possible? Perhaps theres a way to proxy the call and directly connect the http call to the ftp call?
Note I don't control the client application so I can't change it.