public function to_base64()
    {
        if (!empty($this->get_upload_path())) {
            return \base64_encode(\file_get_contents($this->get_upload_path()));
        }

        return \base64_encode(\file_get_contents($this->get_tmp_path()));
    }
public function to_base64()
    {
        if (!empty($this->get_upload_path())) {
            return \base64_encode(\file_get_contents($this->get_upload_path()));
        }

        return \base64_encode(\file_get_contents($this->get_tmp_path()));
    }
public function to_base64 ( ) { if ( ! empty ( $ this -> get_upload_path ( ) ) ) { return \ base64_encode ( \ file_get_contents ( $ this -> get_upload_path ( ) ) ) ; } return \ base64_encode ( \ file_get_contents ( $ this -> get_tmp_path ( ) ) ) ; }
Return a base64 encoded representation of the upload.

@since 1.0.0

@return string
Return a base64 encoded representation of the upload .