1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 02:01:19 +02:00

Construct filesystem correctly.

This commit is contained in:
Franz Liedke
2015-03-26 22:03:47 +01:00
parent 18ccec4190
commit a19f35e8c1

View File

@@ -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,
]); ]);