S3-Compatible API
Access your Droplet storage buckets from any application using the S3-compatible endpoint.
S3 API access is currently in beta. The endpoint and credentials format may change before GA.
Connecting with the AWS SDK
TypeScript
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'const s3 = new S3Client({region: 'auto',endpoint: 'https://storage.droplet.app',credentials: {accessKeyId: process.env.DROPLET_S3_KEY_ID,secretAccessKey: process.env.DROPLET_S3_SECRET,},})// Upload a fileawait s3.send(new PutObjectCommand({Bucket: 'my-bucket',Key: 'uploads/photo.jpg',Body: fileBuffer,}))