klinson / aws-s3-minio
Flexible and feature-complete minio client for PHP, depend on aws/aws-sdk-php
Installs: 5 911
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 1
Forks: 5
Open Issues: 0
Requires
- php: >=7.0.0
- aws/aws-sdk-php: ^3.0.0
README
Description
Flexible and feature-complete minio client for PHP, depend on aws/aws-sdk-php
Installation
composer require klinson/aws-s3-minio
How to use Minio to control object
Loading the library
require 'Minio/Autoloader.php'; Minio\Autoloader::register();
Connecting to Minio
$ObjectClient = new ObjectClient(); // Get the access url, expire at 60 second $url = $ObjectClient->getObjectUrl($save_path, time() + 60);
// Parameters passed using a named array: $minio_config = [ 'key' => 'minio-key', 'secret' => 'minio-secret', 'region' => '', 'version' => 'latest', 'endpoint' => 'http://127.0.0.1:9000', 'bucket' => 'minio-bucket', ]; $ObjectClient = new ObjectClient($minio_config);