I have one application that upload some files and then I can compress as zip file and download.
The export action:
public function exportAction() {
To complete vincent response, just add this right before returning response :
... $response->headers->set('Content-length', filesize($zipName)); unlink($zipName); return $response;