title: Symfony Batch Action
body: <p>I'm trying to create a batch action (symfony admin) that enables the creation/download on the fly of zip file containing users photos which are avaialable on the uploads/images directory.</p>
  
  <p>Here is the code that I already implemented:</p>
  
  <pre><code>public function executeBatchDownloadFotos(sfWebRequest $request)
      {
          $zip = new ZipArchive();
  
          // atheletes identifiers
          $ids = $request-&gt;getParameter('ids');
  
          // get all the atheletes objects
          $q = Doctrine_Query::create()
              -&gt;from('Atleta a')
              -&gt;whereIn('a.id', $ids);
  
          foreach ($q-&gt;execute() as $atleta)
          {
              $zip-&gt;addFile($atleta-&gt;id . '_' . $atleta-&gt;Clube . '.jpg', 'uploads/atletas/' . $atleta-&gt;id . '_' . $atleta-&gt;Clube . '.jpg');
          }
      }
  </code></pre>
  
  <p>By the other hand, here is the view configuration:</p>
  
  <pre><code>BatchDownloadFotos:
    http_metas:
      content-type: application/zip
    has_layout:     false
  </code></pre>
  
  <p>For some reason, each time execute the batch action, the browser do not prompts me with the window to download the zip file.</p>