I'm keeping all uploads on a custom, external drive. The files are being stored via custom API.
In Laravel 5.2, I can do this for a local file to download it:
return response()->download('path/to/file/image.jpg');
Unfortunately, when I pass a URL instead of a path, Laravel throws an error:
The file "https://my-cdn.com/files/image.jpg" does not exist
(the URL is a dummy of course).
Is there any way I can download the image.jpg file using Laravel's implementation or do I do this with plain PHP instead?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…