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:
The file "https://my-cdn.com/files/image.jpg" does not exist
There's no magic, you should download external image using
copy() function, then send it to user in the response:
$filename = 'temp-image.jpg'; $tempImage = tempnam(sys_get_temp_dir(), $filename); copy('https://my-cdn.com/files/image.jpg', $tempImage); return response()->download($tempImage, $filename);