This is regards users' uploads - which are hosted in an S3 bucket - and the best approach for downloading them. Currently I use the following:
return response()->streamDownload(function(){
// Fetch the file
print Storage::disk('s3')->get('file');
}, 'file-name.ext');
This works just fine, but as you can see, the file is first fetched from S3, then streamed via the server to the user's browser. Which, I think, unnecessary work (calls to S3 and bandwidth), since we could just force-download it off S3 servers instead.
I have two questions here: How to force-download the file off s3, and more importantly; am I giving this too much thought? But I really hate the idea of downloading the file twice and putting more pressure on the server!