How to Implement Resumable Download in Silex
问题 In silex I can do this to force-download a file: use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; $app = new Silex\Application(); // Url can be http://pathtomysilexapp.com/download $app->get('/download', function (Request $request) use ($app) { $file = '/path/to/download.zip'; if( !file_exists($file) ){ return new Response('File not found.', 404); } return $app->sendFile($file)-