Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Spaces was designed to be inter-operable with the S3 API (for more details see here). This includes the ability to presign URLs. The only difference when porting from a code base originally targeting S3 will be configuring the correct endpoint (e.g. $REGION.digitaloceanspaces.com).
Here’s a quick example with vanilla PHP:
<?php
// Included aws/aws-sdk-php via Composer's autoloader
// Installed with: composer.phar require aws/aws-sdk-php
require 'vendor/autoload.php';
use Aws\S3\S3Client;
// Configure a client using Spaces
$client = new Aws\S3\S3Client([
'version' => 'latest',
'region' => 'nyc3',
'endpoint' => 'https://nyc3.digitaloceanspaces.com',
'credentials' => [
'key' => 'MY_SPACES_KEY',
'secret' => 'MY_SPACES_SECRET,
],
]);
$cmd = $client->getCommand('GetObject', [
'Bucket' => 'examplebucket',
'Key' => 'file.ext'
]);
$request = $client->createPresignedRequest($cmd, '+5 minutes');
$presignedUrl = (string) $request->getUri();
echo $presignedUrl;