mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 07:07:41 +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 Flarum\Core\Support\DispatchesEvents;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use League\Flysystem\Adapter\Local;
|
use League\Flysystem\Adapter\Local;
|
||||||
|
use League\Flysystem\Filesystem;
|
||||||
use League\Flysystem\FilesystemInterface;
|
use League\Flysystem\FilesystemInterface;
|
||||||
use League\Flysystem\MountManager;
|
use League\Flysystem\MountManager;
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ class UploadAvatarCommandHandler
|
|||||||
$uploadName = Str::lower(Str::quickRandom()) . '.jpg';
|
$uploadName = Str::lower(Str::quickRandom()) . '.jpg';
|
||||||
|
|
||||||
$mount = new MountManager([
|
$mount = new MountManager([
|
||||||
'source' => new Local($command->file->getPath()),
|
'source' => new Filesystem(new Local($command->file->getPath())),
|
||||||
'target' => $this->uploadDir,
|
'target' => $this->uploadDir,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user