Skip to main content

[symfony] get a file downloaded in the controller

        return new Response(file_get_contents($filename), 200, array(
            'Content-Type'        => 'application/pdf',
            'Content-Disposition' => 'attachment; filename="filename.pdf"',
        ));

Comments