Pass newly configured filesystem disk to upload handler.

This commit is contained in:
Franz Liedke 2015-03-26 22:01:58 +01:00
parent e5973aa161
commit 9d416705f9

View File

@ -1,6 +1,7 @@
<?php namespace Flarum\Core;
use Illuminate\Bus\Dispatcher as Bus;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\ServiceProvider;
use Flarum\Core\Formatter\FormatterManager;
@ -91,7 +92,9 @@ class CoreServiceProvider extends ServiceProvider
$this->app->when('Flarum\Core\Handlers\Commands\UploadAvatarCommandHandler')
->needs('League\Flysystem\FilesystemInterface')
->give('flarum.avatars.storage');
->give(function(Container $app) {
return $app->make('Illuminate\Contracts\Filesystem\Factory')->disk('avatars')->getDriver();
});
}
public function registerGambits()