PHP code example of alexeitaber / aws-s3-minio

1. Go to this page and download the library: Download alexeitaber/aws-s3-minio 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/ */

    

alexeitaber / aws-s3-minio example snippets




Minio\Autoloader::register();

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