From 7f388992acee92846d746448265f2e90cc0a0ad0 Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Fri, 23 Dec 2022 18:31:22 +0400 Subject: [PATCH] Add README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..170b357 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# Micro Framework: Filesystem plugin + +Filesystem abstration layer + +## Installation + +First, identify and install the file system adapters you need. (multiple possible). + +```bash +$ composer require micro/plugin-filesystem-{ADAPTER_TYPE} +``` +#### Available adapters: +[micro/plugin-filesystem-s3]() + +[micro/plugin-filesystem-local]() + +And then add plugin to the list of plugins (etc/plugins.php) + +```php + +$pluginsCommon = [ + //....OTHER PLUGINS .... + Micro\Plugin\Filesystem\FilesystemPlugin::class, + Micro\Plugin\Filesystem\Adapter\Aws\FilesystemS3AdapterPlugin::class, + Micro\Plugin\Filesystem\Adapter\Local\FilesystemLocalAdapterPlugin::class, +]; + +``` + +## Configure + +The adapter configuration template usually looks like this `MICRO_FS__` + +Default file system with adapter name "default" + +#### Example configuration : +```dotenv +MICRO_FS_DEFAULT_TYPE=aws_s3 +MICRO_FS_DEFAULT_REGION=us-east-1 +MICRO_FS_DEFAULT_BUCKET=my_bucket +MICRO_FS_DEFAULT_SCHEME=http +MICRO_FS_DEFAULT_VERSION=latest +MICRO_FS_DEFAULT_ENDPOINT=http://filestorage:9000 +MICRO_FS_DEFAULT_KEY_ACCESS=${AWS_S3_KEY_ACCESS} +MICRO_FS_DEFAULT_KEY_SECRET=${AWS_S3_KEY_SECRET} +MICRO_FS_DEFAULT_PUBLIC_URL=http://filestorage:9000/${MICRO_FS_DEFAULT_BUCKET} +``` + + + + + + +