예제 #1
0
 public function uploadProgressAction()
 {
     $id = $this->params()->fromQuery('id', null);
     $progress = new \Zend\ProgressBar\Upload\SessionProgress();
     return new \Zend\View\Model\JsonModel($progress->getProgress($id));
 }
예제 #2
0
 public function uploadprogressAction()
 {
     //$id = $this->params()->fromQuery('id', null);
     $id = $this->request->getPost('id');
     //echo "esto es id:".$id;
     $progress = new \Zend\ProgressBar\Upload\SessionProgress();
     //echo "esto es progres<pre>".print_r($progress->getProgress($id))."<pre>";
     //$view = new \Zend\View\Model\JsonModel(array(
     //'id'     => $id,
     //      'status' => $progress->getProgress($id)
     //));
     //return new ViewModel(array('status' => $progress->getProgress($id)));
     //return new \Zend\View\Model\JsonModel($progress->getProgress($id));
     //return new ViewModel(array('status' => $progress->getProgress($id)));
     $vista = new ViewModel(array('id' => $progress->getProgress($id)));
     $vista->setTerminal(true);
     return $vista;
 }