I am using Slim Framework 3. Here's my code:
....
$response = $response->withStatus(200)
->withHeader('X-Sendfile', $path)
->withHeader('Content-Type', $contentType)
->withHeader('Content-disposition:', 'attachment; filename=' . $fileName);
return $response;
....
When using through postman, I see the image. But, how do I show the image / video / audio on an html page using the response?