public function uploader()
 {
     $config = array("savePath" => '', "maxSize" => 1000, "allowFiles" => array(".gif", ".png", ".jpg", ".jpeg", ".bmp"));
     $Path = "/uploads/projects/images/";
     $config["savePath"] = $Path;
     $up = new Uploader("upfile", $config);
     $info = $up->getFileInfo();
     $info['result'] = $info['state'] == 'SUCCESS' ? true : false;
     $info['file'] = $info['url'];
     $info['thumb'] = '';
     $info['type'] = str_replace('.', '', $info['type']);
     return $info;
 }
 public function postUpdateImage()
 {
     $config = array("savePath" => '', "maxSize" => 1000, "allowFiles" => array(".gif", ".png", ".jpg", ".jpeg", ".bmp"));
     $Path = "/uploads/articles/images/";
     $config["savePath"] = $Path;
     $up = new Uploader("upfile", $config);
     $info = $up->getFileInfo();
     return json_encode($info);
 }