Category : mime

I have a Laravel controller that retrieves binary image data from some source like the database or an API and returns it as the response: class ExampleController extends Controller { // … public function testImage(Request $request) { $binaryImageData = $this->repository->getImage($request->query); return response($binaryImageData); } } However since Laravel returns a Content-Type header value of `text/html’ when ..

Read more