function execute()
 {
     $id = Request::post('id');
     $model = new connectionUserAttachmentModel();
     $login = ConnectionHelper::userLogin();
     $result = array('code' => $id);
     $file = Request::files('attach');
     if (sizeof($file) > 0) {
         $id = $model->addFile($file[0], $login['id']);
         if ($id) {
             $result['id'] = $id;
             $result['url'] = '/attachment/size-50/' . $id;
         }
     }
     return $result;
 }
 function execute()
 {
     $id = Request::post('id');
     $size = Request::post('size');
     $model = new connectionUserAttachmentModel();
     $result = array('code' => $id);
     $file = Request::files('attach');
     if (sizeof($file) > 0) {
         $id = $model->addFile($file[0], 0);
         if ($id) {
             $result['id'] = $id;
             $result['url'] = '/attachment/size-' . $size . '/' . $id;
         }
     }
     return $result;
 }