Skip to content

Instantly share code, notes, and snippets.

@spacedmonkey

spacedmonkey/s3.php

Last active Sep 18, 2020
Embed
What would you like to do?
Using Digital Ocean spaces with S3 Uploads plugin
add_filter( 's3_uploads_s3_client_params', function ( $params ) {
if ( defined( 'S3_UPLOADS_ENDPOINT' ) ) {
$params['endpoint'] = S3_UPLOADS_ENDPOINT;
}
return $params;
}, 5, 1 );
define('S3_UPLOADS_BUCKET', <space_name>);
define('S3_UPLOADS_REGION', 'ams3');
define('S3_UPLOADS_KEY',<space_access_key>);
define('S3_UPLOADS_SECRET', <space_secret>);
define('S3_UPLOADS_BUCKET_URL', 'https://<space_name>.ams3.digitaloceanspaces.com');
define('S3_UPLOADS_ENDPOINT', 'ams3.digitaloceanspaces.com');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.