file('/etc/passwd', 'blougou', ResponseHeaderBag::DISPOSITION_INLINE); // Defaults to 'attachment; filename="${basename($file)}"'. When not using // the 2nd and 3rd arguments: // $response->headers->set('Content-disposition', 'inline'); return $response; } }