一只超帅的猪 不会吧
其实覆盖进去只覆盖了一个文件
其他是新增的,如果有问题,我就不知道了,我这边没问题了
覆盖文件目录结构是这样的
vendor
└───fof
└───upload
├───resources //这个目录里面的文件全是新增的,如果有问题,找出来删掉
└───src
├───Providers //这里面的DownloadProvider.php 有修改
└───Templates //这个目录里面的文件全是新增的
只有 vendor/fof/upload/src/Providers/DownloadProvider.php 这个文件有修改过
<?php
namespace FoF\Upload\Providers;
use FoF\Upload\Commands\DownloadHandler;
use FoF\Upload\Downloader\DefaultDownloader;
use FoF\Upload\Helpers\Settings;
use FoF\Upload\Templates\FileTemplate;
use FoF\Upload\Templates\ImagePreviewTemplate;
use FoF\Upload\Templates\ImageTemplate;
use FoF\Upload\Templates\VideoTemplate; //add
use FoF\Upload\Templates\AudioTemplate; //add
use FoF\Upload\Templates\TextTemplate; //add
use FoF\Upload\Templates\PdfTemplate; //add
use Flarum\Foundation\AbstractServiceProvider;
class DownloadProvider extends AbstractServiceProvider
{
public function register()
{
DownloadHandler::addDownloader(
$this->app->make(DefaultDownloader::class)
);
$this->loadViewsFrom(__DIR__ . '/../../resources/templates', 'fof-upload.templates');
/** @var Settings $settings */
$settings = $this->app->make(Settings::class);
$settings->addRenderTemplate($this->app->make(FileTemplate::class));
$settings->addRenderTemplate($this->app->make(ImageTemplate::class));
$settings->addRenderTemplate($this->app->make(ImagePreviewTemplate::class));
$settings->addRenderTemplate($this->app->make(VideoTemplate::class)); //add
$settings->addRenderTemplate($this->app->make(AudioTemplate::class)); //add
$settings->addRenderTemplate($this->app->make(TextTemplate::class)); //add
$settings->addRenderTemplate($this->app->make(PdfTemplate::class)); //add
}
}
另外 fof-upload 是什么版本我忘了
不过,覆盖之前还是备份吧
安全第一安全第一