Last active
September 5, 2023 20:43
Star
You must be signed in to star a gist
Using Digital Ocean spaces with S3 Uploads plugin
This file contains 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 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