How to Manage Bucket Files

Validated on 29 Jan 2026 • Last edited on 23 Mar 2026

Spaces Object Storage is an S3-compatible service for storing and serving large amounts of data. The built-in Spaces CDN minimizes page load times, improves performance, and reduces bandwidth and infrastructure costs.

You can upload, download, and delete files from your Spaces buckets using the DigitalOcean Control Panel or the API.

Upload Files Using the Control Panel

To upload one or more files to your bucket using the control panel, you can only upload files smaller than 2 GB and batches of less than 100 files due to browser limitations. We recommend using a third-party client or the API for large files and batches.

To upload files to your bucket, go to the control panel, in the left menu, click Spaces Object Storage, and then under the Buckets tab, click the bucket you want to upload files to. From the bucket’s overview page, under the Files tab, click Upload to select and upload files from your local computer. This doesn’t support adding folders.

Once you select files to upload, the Upload files window opens. Under the Select the file permissions section, choose your file permissions, which determine whether the file is Private or Public:

  • Private: The file is accessible only through authenticated requests or presigned URLs.
  • Public: The file is publicly accessible and can be viewed or downloaded by anyone with the file’s URL.

The X button to the right of each item unstages that file or folder. Folders and their contents are treated as a unit, so removing a folder here unstages the folder and all the files and folders within it.

If you see all the files you want uploaded listed, click Upload to upload the files with the permissions you’ve selected.

Everything you stage is visible in the Spaces selection window, which stays open to allow you to continue to stage more files.

Upload Files Using Automation

You can upload files to a bucket using S3-compatible tools or the Spaces API. Uploading files through automation is useful for CI/CD workflows, batch uploads, or integrating Spaces with applications and build systems.

The DigitalOcean CLI (doctl) doesn’t support uploading files to buckets.

Upload Files via S3-Compatible Tools

To upload files from the command line, use an S3-compatible tool such as AWS CLI or s3cmd. These tools interact directly with the Spaces S3-compatible API and support single-file and recursive uploads. For example, using s3cmd, you can upload a file like this:

s3cmd put local-file.txt s3://<bucket-name>/local-file.txt

You can also upload directories recursively or sync local directories to a bucket. For more examples, see the s3cmd usage guide.

Upload Files via the API

You can upload files using the DigitalOcean API. Small files can be uploaded with a single request, while large files should be uploaded using multipart uploads.

To upload an object with a single request, send a PUT request to the object endpoint. For more details, see the Spaces API reference.

For large files, use multipart uploads, which split the object into multiple parts that can be uploaded independently and retried if interrupted. This improves reliability for large files or unstable network connections.

Download Files Using the Control Panel

To download a file from a bucket to your local computer, go to the control panel, in the left menu, click Spaces Object Storage, and then under the Buckets tab, click the bucket you want to download files from. From the bucket’s overview page, under the Files tab, find the files you want to download, and for each, on the right side of them, click , and then click Download.

Depending on your browser’s preferences, the download may start automatically or you may be prompted to save the file first. The item may also open in your browser, depending upon the file type and your browser.

Download Files Using Automation

You can download files from a Spaces bucket using S3-compatible tools or the DigitalOcean API. Downloading files through automation is useful for backup workflows, data processing pipelines, or application integrations.

The DigitalOcean CLI (doctl) doesn’t support downloading files from Spaces buckets.

Download Files via S3-Compatible Tools

To download files from the command line, use an S3-compatible tool such as AWS CLI or s3cmd.

For example, using s3cmd, you can download a file like this:

s3cmd get s3://<bucket-name>/path/to/file.txt local-file.txt

These tools also support recursive downloads and directory sync operations. For more examples, see the s3cmd usage guide.

Download Files via the API

You can download files using the DigitalOcean API by sending a GET request to the object endpoint. The response contains the object’s contents.

For private buckets, ensure the request is properly authenticated or use a presigned URL to grant temporary access.

Delete Files Using the Control Panel

To delete a file from a bucket to your local computer, go to the control panel, in the left menu, click Spaces Object Storage, and then under the Buckets tab, click the bucket you want to delete files for. From the bucket’s overview page, under the Files tab, on the right of each file, click , and then click Delete.

Deletions are permanent, so you need to confirm the deletion in the window that opens before the item is actually deleted.

You can delete multiple files at once by clicking the checkbox on the right of all the files you want to delete, and then on the top right, click the Actions dropdown menu, and then click Delete to open the deletion window. In this window, confirm deletion by entering the name of your bucket, and then click Delete.

Delete Files Using Automation

You can delete files from a bucket using S3-compatible tools or the DigitalOcean API. Deleting files through automation is useful for cleanup jobs, lifecycle workflows, or removing outdated or invalid content.

The DigitalOcean CLI (doctl) doesn’t support deleting individual files from Spaces buckets.

Delete Files via S3-Compatible Tools

To delete files from the command line, use an S3-compatible tool such as AWS CLI or s3cmd. For example, using s3cmd, you can delete a file like this:

s3cmd del s3://<bucket-name>/path/to/file.txt

These tools also support deleting multiple files, recursive deletes, and syncing operations. For more examples, see the s3cmd usage guide.

Delete Files via the API

You can delete a file using the DigitalOcean API by sending a DELETE request to the object endpoint.

Deleting an object permanently removes it from the bucket. To prevent accidental deletions, consider enabling object versioning or using lifecycle rules where appropriate.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.