Last active
November 6, 2024 15:19
-
-
Save spacedmonkey/bdea0012b0cb25065cc1662956364df8 to your computer and use it in GitHub Desktop.
Using Digital Ocean spaces with S3 Uploads plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 's3_uploads_s3_client_params', function ( $params ) { | |
if ( defined( 'S3_UPLOADS_ENDPOINT' ) ) { | |
$params['endpoint'] = S3_UPLOADS_ENDPOINT; | |
} | |
return $params; | |
}, 5, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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