23 lines
No EOL
726 B
PHP
23 lines
No EOL
726 B
PHP
<?php
|
|
|
|
function getSkills() {
|
|
include("./lib/config.php");
|
|
$s3Client = new Aws\S3\S3Client([
|
|
'version' => 'latest',
|
|
'region' => 'us-east-1',
|
|
'endpoint' => $S3Server,
|
|
'use_path_style_endpoint' => true,
|
|
'credentials' => [
|
|
'key' => $S3AccessKey,
|
|
'secret' => $S3SecretKey,
|
|
],
|
|
]);
|
|
|
|
$result = $s3Client->ListObjects(['Bucket' => $S3BucketName, 'Delimiter'=>'/', 'Prefix' => 'skills/']);
|
|
|
|
$response = [];
|
|
foreach ($result["Contents"] as $skill){
|
|
array_push($response, $skill["Key"]);
|
|
}
|
|
return $response;
|
|
} |