# S3 compatible endpoints (DigitalOcean spaces)

## Configuration

### Connecting the DigitalOcean spaces data source

UI Bakery supports S3-compatible object storage APIs, for example, [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces/).&#x20;

You can connect it following the same flow as with the AWS S3 data source. Let's recap the steps:

1. On the **Data sources** page, click **Connect**, and select *AWS S3* in the Data sources list.
2. Enter the data source name and specify the **Access key ID** and **Secret access key ID.**
3. Select the **Use custom endpoint** checkbox and specify the base URL.
4. Click **Test connection** to check whether the data source can be connected, and then click **Connect Datasource** to complete the setup.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2Fn0cNZWTtAQeT6j63gq57%2FCleanShot%202025-04-08%20at%2012.41.50%402x-min.png?alt=media&#x26;token=2f887acd-eeab-4de3-8c33-934f248230ad" alt=""><figcaption></figcaption></figure>

## Usage

### Using the S3 file uploader component with DigitalOcean Spaces

Using the [S3 file uploader](https://docs.uibakery.io/reference/working-with-components/aws-s3-uploader) component implies direct upload to the bucket. If you're planning to use it in UI Bakery, you need to set up *CORS settings* in your DigitalOcean bucket settings.&#x20;

In the settings, use `https://cloudworkbench.uibakery.io` for the **Origin** field - on cloud. For the self-hosted version, change `https://cloudworkbench.uibakery.io` to the domain from which you access your UI Bakery instance.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FtQ2FivKo8URb5qlQII5u%2Fspaces_UX6zPRMFFK0yrTghj7cY_uploads_git-blob-5de4daa5ab48e97091962c066c2a23841d126ab9_image%20(178)-min.png?alt=media&#x26;token=170dd534-5192-4c27-afa0-9a123447a8c6" alt=""><figcaption></figcaption></figure>
