1. Go to this page and download the library: Download cusodede/yii2-s3-module library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cusodede / yii2-s3-module example snippets
return [
// ...
'modules' => [
's3' => [
'class' => cusodede\s3\S3Module::class,
'defaultRoute' => 'index',
'params' => [
'connection' => [
'host' => 'minio_host',
'login' => 'minio_user',
'password' => 'minio_password',
'connect_timeout' => 10, /* http connection timeout */
'timeout' => 10, /* http timeout */
'cert_path' => null, /* path to ssl certificate, set null to disable */
'cert_password' => null /* certificate password, set null, if certificate has no password */
],
'tableName' => 'sys_cloud_storage', /* the table with storage data info, see Module migration section */
'tagsTableName' => 'sys_cloud_storage_tags', /* the table with local tags, see Module migration section */
'viewPath' => '@vendor/cusodede/yii2-s3-module/src/views/index', /* path to view templates, if you want to customize them */
'maxUploadFileSize' => null, /* a file size limit for uploaded file, set null to disable */
'defaultBucket' => 'bucket', /* a name of bucket, used by default, if null, an alphabetically first bucket will be used */
'mimeTypes' => [
'apk' => 'application/vnd.android.package-archive',
],/* mime types list (ext => mime), used for downloaded files mime substitution. Note: that list overrides a magic.mime file information. */
'defaultMimeType' => 'application/octet-stream', /* mime type, that be used for any file, which extension aren't