code: public static function upload($src, $dest)
    {
      $dest = Path::clean($dest);
      $baseDir = dirname($dest);
  
      try {
        if ( !Folder::exists($baseDir) ){
          Folder::create($baseDir);
        }
      }
      catch(Exception $e){
        throw $e;
      }
      
      if ( is_writeable($baseDir) && move_uploaded_file($src, $dest) ){
        if ( Path::setPermissions($dest) ){
          return true;
        }
        
        throw new Exception(Helper::getTranslation('FAILED_CHMOD'));
      }
      
      throw new Exception(Helper::getTranslation('FAILED_MOVE_UPLOAD'));
    }
docs: Moves an uploaded file to a destination folder
  
  @param   string    $src          The name of the php (temporary) uploaded file
  @param   string    $dest         The path (including filename) to move the uploaded file to
  @return   boolean   True on success
  @throws   Exception