public function upload($file = null)
    {

        if (empty($file) || !is_array($file)) return false;

        $this->u_tmp_name  = $file['tmp_name'];
        $this->u_name      = $file['name'];
        $this->u_size      = $file['size'];
        $this->u_mime_type = $file['type'];
        $this->u_error     = isset($file['error']) ? $file['error'] : null;

        if ($this->u_error) {
            throw new FileException("File couldn't be uploaded reason " . FileException::$upload_errors[$this->u_error], Config::get('file_error'), Config::get('error_lvl_low'), __FILE__, __LINE__);
        }

        $this->_get_file_extension();

        return true;
    }
public function upload($file = null)
    {

        if (empty($file) || !is_array($file)) return false;

        $this->u_tmp_name  = $file['tmp_name'];
        $this->u_name      = $file['name'];
        $this->u_size      = $file['size'];
        $this->u_mime_type = $file['type'];
        $this->u_error     = isset($file['error']) ? $file['error'] : null;

        if ($this->u_error) {
            throw new FileException("File couldn't be uploaded reason " . FileException::$upload_errors[$this->u_error], Config::get('file_error'), Config::get('error_lvl_low'), __FILE__, __LINE__);
        }

        $this->_get_file_extension();

        return true;
    }
public function upload ( $ file = null ) { if ( empty ( $ file ) || ! is_array ( $ file ) ) return false ; $ this -> u_tmp_name = $ file [ 'tmp_name' ] ; $ this -> u_name = $ file [ 'name' ] ; $ this -> u_size = $ file [ 'size' ] ; $ this -> u_mime_type = $ file [ 'type' ] ; $ this -> u_error = isset ( $ file [ 'error' ] ) ? $ file [ 'error' ] : null ; if ( $ this -> u_error ) { throw new FileException ( "File couldn't be uploaded reason " . FileException :: $ upload_errors [ $ this -> u_error ] , Config :: get ( 'file_error' ) , Config :: get ( 'error_lvl_low' ) , __FILE__ , __LINE__ ) ; } $ this -> _get_file_extension ( ) ; return true ; }
current upload process

@param $file array

@return bool
@throws FileException
current upload process