S3 Asset hosting with DigitalOcean S3 Spaces

Where in the code or params does it reference amazon s3 endpoint path?

I can see there are some parameters for S3 hosting in the froala WYSIWYG editor plugin but unable to find anything else, the S3 cloud bundle just holds the keys, buckets and regions.

Endgame I want to extend the option so we can use DigitalOcean S3 Spaces, as all the logic is the same other than the s3 path