umonkey/php-s3-client

1.0.0 2020-06-12 23:48 UTC

This package is auto-updated.

Last update: 2024-10-13 08:59:39 UTC


README

Simple client for personal projects.

Usage:

$s3 = new \Umonkey\S3([
    'bucket' => 'foobar',
    'bucket_region' => 'ru-central1',
    'acl' => 'public-read',
    'access_key' => null,
    'secret_key' => null,
    'endpoint' => 'storage.yandexcloud.net',
]);

list($status, $output, $url) = $s3->putObject('videos/example.mp4', __DIR__ . '/video.mp4', [
    'content-type' => 'video/mpeg4',
]);

if ($status === 200) {
    var_dump($url);
}