alexeitaber/aws-s3-minio

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

v1.3.1 2023-01-27 11:10 UTC

This package is not auto-updated.

Last update: 2024-04-20 15:33:26 UTC


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