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