Exemplo n.º 1
0
 /**
  * Target for the upload handler
  */
 public function handleUpload()
 {
     try {
         $files = $this->app->get("FILES");
         $model = \Dsc\Mongo\Collections\Assets::createFromUpload($files['import_file'], array('type' => 'redirect.importer'));
         $this->app->reroute("/admin/redirect/import/preview/" . $model->id);
     } catch (\Exception $e) {
         \Dsc\System::addMessage($e->getMessage(), 'error');
         $this->app->reroute("/admin/redirect/import");
     }
 }