mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 05:53:37 +08:00
Construct filesystem correctly.
This commit is contained in:
parent
9d416705f9
commit
77b4e7694a
@ -6,6 +6,7 @@ use Flarum\Core\Repositories\UserRepositoryInterface;
|
||||
use Flarum\Core\Support\DispatchesEvents;
|
||||
use Illuminate\Support\Str;
|
||||
use League\Flysystem\Adapter\Local;
|
||||
use League\Flysystem\Filesystem;
|
||||
use League\Flysystem\FilesystemInterface;
|
||||
use League\Flysystem\MountManager;
|
||||
|
||||
@ -42,7 +43,7 @@ class UploadAvatarCommandHandler
|
||||
$uploadName = Str::lower(Str::quickRandom()) . '.jpg';
|
||||
|
||||
$mount = new MountManager([
|
||||
'source' => new Local($command->file->getPath()),
|
||||
'source' => new Filesystem(new Local($command->file->getPath())),
|
||||
'target' => $this->uploadDir,
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user