creocoder / yii2-flysystem

The Flysystem integration for the Yii framework.
Other
283 stars 76 forks source link

BadMethodCallException on getWithMetadata #19

Open glutaminefree opened 8 years ago

glutaminefree commented 8 years ago

When I call

Yii::$app->fs->getWithMetadata('/path/to/file', ['mimetype']);

I get:

BadMethodCallException
Call to undefined method League\Flysystem\Filesystem::getWithMetadata

I found this https://github.com/thephpleague/flysystem/issues/461

Adding this line:

$this->filesystem->addPlugin(new \League\Flysystem\Plugin\GetWithMetadata());

to yii2-flysystem/src/Filesystem.php to end of init() method fix this bug. But it return all metadata, not only parameterss from second argument of function.