mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-09 04:27:47 +08:00
Support custom textures storage directory (#127)
* Support custom textures storage directory * fix test * update changelog Co-authored-by: Pig Fang <g-plane@hotmail.com>
This commit is contained in:
parent
640a714d8e
commit
ad528520ca
@ -44,3 +44,5 @@ REDIS_PORT = 6379
|
||||
|
||||
PLUGINS_DIR = null
|
||||
PLUGINS_URL = null
|
||||
|
||||
TEXTURES_DIR = null
|
||||
|
@ -32,4 +32,6 @@ REDIS_PORT=6379
|
||||
PLUGINS_DIR=plugins
|
||||
PLUGINS_URL=
|
||||
|
||||
TEXTURES_DIR=
|
||||
|
||||
JWT_SECRET=1tdM3gXarxYI4KlAHMBo238iC2tEb4I3EtBlZTQQXvInXIt7V2ix7hJ1KTvxCKZW
|
||||
|
@ -55,7 +55,7 @@ return [
|
||||
|
||||
'textures' => [
|
||||
'driver' => env('FS_DRIVER', 'local'),
|
||||
'root' => storage_path('textures'),
|
||||
'root' => env('TEXTURES_DIR', storage_path('textures')),
|
||||
],
|
||||
|
||||
'testing' => [
|
||||
|
@ -19,6 +19,7 @@
|
||||
- Added support of character "§" for player name. (Under CJK mode.)
|
||||
- New password hash algorithm: Argon2i.
|
||||
- Support searching players when applying textures.
|
||||
- Support customizing textures storage directory.
|
||||
|
||||
## Tweaked
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
- 角色名支持字符「§」(需开启「CJK」模式)
|
||||
- 新的密码哈希算法:Argon2i
|
||||
- 将材质应用到角色时可进行搜索
|
||||
- 支持自定义材质存储目录
|
||||
|
||||
## 调整
|
||||
|
||||
|
@ -593,6 +593,8 @@ class SkinlibControllerTest extends TestCase
|
||||
|
||||
public function testDelete()
|
||||
{
|
||||
$disk = Storage::fake('textures');
|
||||
|
||||
$uploader = factory(User::class)->create();
|
||||
$other = factory(User::class)->create();
|
||||
$texture = factory(Texture::class)->create(['uploader' => $uploader->uid]);
|
||||
@ -625,7 +627,7 @@ class SkinlibControllerTest extends TestCase
|
||||
|
||||
$texture = factory(Texture::class)->create();
|
||||
factory(Texture::class)->create(['hash' => $texture->hash]);
|
||||
Storage::disk('textures')->put($texture->hash, '');
|
||||
$disk->put($texture->hash, '');
|
||||
|
||||
// When file is occupied, the file should not be deleted
|
||||
$this->postJson('/skinlib/delete', ['tid' => $texture->tid])
|
||||
|
Loading…
Reference in New Issue
Block a user