Skip to content

Instantly share code, notes, and snippets.

Last active Sep 18, 2020
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_SECRET', <space_secret>);
define('S3_UPLOADS_BUCKET_URL', 'https://<space_name>');
define('S3_UPLOADS_ENDPOINT', '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment