mardi 23 janvier 2018

Laravel/Lumen Get image file via two servers

I need to stream file content (such a as images and other mime types) from a Lumen resource server to a Laravel client server. I know in Laravel I can use:

$headers = ['Content-Type' => 'image/png']; 
$path = storage_path('app/.../example_image.png')
return response()->file($path, $headers);

However, the file method is absent in Laravel\Lumen\Http\ResponseFactory.

Any suggestions are very welcome.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire