KodPlugins icon indicating copy to clipboard operation
KodPlugins copied to clipboard

可道云 onlyoffice 报错

Open Flikify opened this issue 2 years ago • 0 comments

问题

可道云 onlyoffice 报错: The "documentType" parameter for the config object is invalid. Please correct it.

解决办法

修改onlyoffice插件内的app.php文件 16行附近 将原来的内容注释

/*      $path = $this->filePath($this->in['path']);
        $fileUrl = $this->filePathLinkOut($this->in['path']);
        $fileName = $this->fileInfo['name'];
        $fileExt = get_path_ext($this->fileInfo['name']);
        $mtime = IO::infoFull($path)['modifyTime']; */

粘贴

    public function index() {
	$file = $this->in['path'];
	$fileInfo = IO::info($file);
        $path = $this->filePath($this->in['path']);
        $fileUrl = $this->filePathLinkOut($this->in['path']);
        // $fileName = $this->fileInfo['name'];
        // $fileExt = get_path_ext($this->fileInfo['name']);
        $fileName = $fileInfo['name'];
        if ($fileName) {
                $fileExt = get_path_ext($fileName);
            } else {
                $fileExt = $this->in['ext'];
        }
        $mtime = IO::infoFull($path)['modifyTime'];

Flikify avatar Oct 12 '23 03:10 Flikify