I believe the bundle does this automatically: https://github.com/igorw/IgorwFileServeBundle/blob/master/Response/AbstractResponseFactory.php#L42