How to Upload, Download, and Delete Files

Spaces Object Storage is an S3-compatible object storage service. Spaces buckets let you store and serve large amounts of data, and the built-in CDN minimizes page load times and improves performance.

You can upload, download, and delete files from your Spaces buckets using the control panel or the API.

Upload Files

You can upload one or more files to a bucket via the control panel or the DigitalOcean API.

Because of browser limitations, control panel uploads work best with files smaller than 2GB and batches of less than 100 files. We recommend using a third-party client or the DigitalOcean API for large files and batches.

To upload a file with the API, see Upload an Object or Begin a Multi-Part Upload.

In the DigitalOcean Control Panel, from Spaces overview page, click the bucket you want to work with. From the bucket’s detail page, you can stage files for upload in two ways:

  1. By dragging and dropping items to your browser, which allows you to add files, folders, and items nested inside folders.
  2. By clicking Upload Files, which opens a window to add files from your local computer, but doesn’t support adding folders.

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

The Upload File window

This window also lets you set the file permissions for all staged files. 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.

Click Upload Files to upload the items you’ve staged with the permissions you’ve selected.

Download Files

You can download files using the Spaces API or the control panel.

To download a file with the API, see Get an Object.

To download a file from a bucket to your local computer with the control panel, open the More menu of the file.

The more menu of a file in a bucket

Select Download to start a download of the item to your local machine. 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.

Delete Files

You can delete files using the Spaces API or the control panel.

To delete a file with the API, see Delete an Object.

To delete a file from a bucket with the control panel, open the More menu of the file.

The more menu of a file in a bucket

Select Delete to delete the file. 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 selecting them, opening the Actions menu, and clicking Delete. This will similarly prompt you to confirm the deletion.

Search Files

To search a bucket for a specific file, go to the bucket’s Files tab and enter the filename into the search bar. This displays all files that begin with a matching string in the current directory.

The search bar in the bucket's Files page

The search feature only supports prefix searching, meaning that it only returns files with names that begin with the string you searched for. There is no wildcard search character. Additionally, it only returns files in your current directory, meaning it cannot search within folders.