|
@@ -5,14 +5,16 @@ header('Access-Control-Allow-Origin: *');
|
|
|
header("Access-Control-Allow-Headers: GET");
|
|
|
|
|
|
// CONFIG: Change these variables to a valid region and bucket.
|
|
|
-$awsRegion = 'eu-west-2';
|
|
|
-$bucket = 'uppy-test';
|
|
|
+$awsEndpoint = getenv('COMPANION_AWS_ENDPOINT') ?: null;
|
|
|
+$awsRegion = getenv('COMPANION_AWS_REGION') ?: 'eu-west-2';
|
|
|
+$bucket = getenv('COMPANION_AWS_BUCKET') ?: 'uppy-test';
|
|
|
// Directory to place uploaded files in.
|
|
|
$directory = 'uppy-php-example';
|
|
|
|
|
|
// Create the S3 client.
|
|
|
$s3 = new Aws\S3\S3Client([
|
|
|
'version' => 'latest',
|
|
|
+ 'endpoint' => $awsEndpoint,
|
|
|
'region' => $awsRegion,
|
|
|
]);
|
|
|
|