up.
This commit is contained in:
parent
36dbbc8cb3
commit
e2c86c0c6d
@ -1,11 +1,21 @@
|
||||
<?php
|
||||
// 应用公共文件
|
||||
use app\service\DictionaryService;
|
||||
use app\service\file\FilesystemService;
|
||||
use Hashids\Hashids;
|
||||
use think\Collection;
|
||||
use think\facade\Event;
|
||||
use think\Model;
|
||||
|
||||
|
||||
/**
|
||||
* @return FilesystemService
|
||||
*/
|
||||
function filesystem(): FilesystemService
|
||||
{
|
||||
return app()->filesystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入日志
|
||||
* @param array|string $event
|
||||
|
||||
@ -5,7 +5,7 @@ namespace app\service;
|
||||
use app\entity\SysFileRecord;
|
||||
use app\entity\SysFileRule;
|
||||
use app\entity\UploadFile;
|
||||
use app\service\file\FilesystemUploadService;
|
||||
use app\service\file\FilesystemService;
|
||||
use think\File;
|
||||
use think\Service;
|
||||
|
||||
@ -19,7 +19,7 @@ class FileService extends Service
|
||||
/*
|
||||
* 注册到全局容器中
|
||||
*/
|
||||
$this->app->bind('filesystem', FilesystemUploadService::class);
|
||||
$this->app->bind('filesystem', FilesystemService::class);
|
||||
}
|
||||
|
||||
public function upload(string $contextId, File $file, SysFileRule $rule): UploadFile
|
||||
|
||||
@ -14,7 +14,7 @@ use think\facade\Validate;
|
||||
use think\file\UploadedFile;
|
||||
use think\helper\Str;
|
||||
|
||||
class FilesystemUploadService
|
||||
class FilesystemService
|
||||
{
|
||||
protected App $app;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user