I'm building application using Lumen to fetch external url and force download it using VueJS. The code works fine in Chrome but it asks me whether to download the files or not and I click 'Download;. However, I've tested the code in firefox and safari and it's not working and there is no dialog to enable downloading files.
The download method may be used to generate a response that forces the user's browser to download the file at the given path. The download method accepts a file name as the second argument to the method, which will determine the file name that is seen by the user downloading the file. Finally, you may pass an array of HTTP headers as the third argument to the method:
I've had issues with certain browsers downloading files depending on the headers set.