/aws-s3-minio

Flexible and feature-complete Redis client for PHP, depend on aws/aws-sdk-php

Primary LanguagePHPMIT LicenseMIT

klinson/aws-s3-minio

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);