> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.dropboxapi.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.dropboxapi.com/_mcp/server.

# Getting Started

This guide walks through common Object Store operations. Before you begin, make sure you've [configured your client](/object-storage/docs/configuration) with your credentials.

All examples use the endpoint `https://seal.dropboxapi.com` and assume you have credentials provided by Dropbox and a bucket. Data is automatically replicated to 2 regions.

## Upload an Object

#### Python

```python
# Upload an object
s3_client.put_object(
    Bucket='your-bucket',
    Key='documents/document.txt',
    Body=b'file content here'
)

# Upload with metadata
s3_client.put_object(
    Bucket='your-bucket',
    Key='data/config.json',
    Body=b'{"setting": "value"}',
    ContentType='application/json',
    Metadata={'author': 'user123'}
)
```

#### Node.js

```javascript
import { PutObjectCommand } from '@aws-sdk/client-s3';

// Upload an object
const command = new PutObjectCommand({
  Bucket: 'your-bucket',
  Key: 'documents/document.txt',
  Body: Buffer.from('file content here')
});

await s3Client.send(command);
```

#### Go

```go
import (
    "bytes"
    "github.com/aws/aws-sdk-go/service/s3"
)

// Upload an object
_, err := svc.PutObject(&s3.PutObjectInput{
    Bucket: aws.String("your-bucket"),
    Key:    aws.String("documents/document.txt"),
    Body:   bytes.NewReader([]byte("file content here")),
})
if err != nil {
    panic(err)
}
```

#### AWS CLI

```bash
# Upload a file
aws s3 cp document.pdf s3://your-bucket/documents/document.pdf \
  --endpoint-url $OBJECT_STORE_ENDPOINT

# Upload a directory recursively
aws s3 cp ./my-folder s3://your-bucket/my-folder/ \
  --recursive \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## Download an Object

#### Python

```python
# Get object content
response = s3_client.get_object(
    Bucket='your-bucket',
    Key='documents/document.txt'
)
content = response['Body'].read()

# Get with range
response = s3_client.get_object(
    Bucket='your-bucket',
    Key='data/large-file.bin',
    Range='bytes=0-1023'
)
first_kb = response['Body'].read()
```

#### Node.js

```javascript
import { GetObjectCommand } from '@aws-sdk/client-s3';

const command = new GetObjectCommand({
  Bucket: 'your-bucket',
  Key: 'documents/document.txt'
});

const response = await s3Client.send(command);
const body = await response.Body.transformToByteArray();
```

#### Go

```go
import (
    "io"
    "github.com/aws/aws-sdk-go/service/s3"
)

// Get object content
result, err := svc.GetObject(&s3.GetObjectInput{
    Bucket: aws.String("your-bucket"),
    Key:    aws.String("documents/document.txt"),
})
if err != nil {
    panic(err)
}
defer result.Body.Close()

content, err := io.ReadAll(result.Body)
if err != nil {
    panic(err)
}
```

#### AWS CLI

```bash
# Download a file
aws s3 cp s3://your-bucket/documents/document.pdf ./downloaded.pdf \
  --endpoint-url $OBJECT_STORE_ENDPOINT

# Download a directory recursively
aws s3 cp s3://your-bucket/my-folder/ ./local-folder/ \
  --recursive \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## List Objects

List the objects in your bucket:

#### Python

```python
# List all objects
response = s3_client.list_objects_v2(Bucket='your-bucket')

for obj in response.get('Contents', []):
    print(f"{obj['Key']} - {obj['Size']} bytes")

# List with prefix
response = s3_client.list_objects_v2(
    Bucket='your-bucket',
    Prefix='documents/'
)

for obj in response.get('Contents', []):
    print(obj['Key'])
```

#### Node.js

```javascript
import { ListObjectsV2Command } from '@aws-sdk/client-s3';

// List all objects
const command = new ListObjectsV2Command({
  Bucket: 'your-bucket',
  Prefix: 'documents/'
});

const response = await s3Client.send(command);

for (const obj of response.Contents || []) {
  console.log(`${obj.Key} - ${obj.Size} bytes`);
}
```

#### Go

```go
import (
    "fmt"
    "github.com/aws/aws-sdk-go/service/s3"
)

// List all objects
result, err := svc.ListObjectsV2(&s3.ListObjectsV2Input{
    Bucket: aws.String("your-bucket"),
    Prefix: aws.String("documents/"),
})
if err != nil {
    panic(err)
}

for _, item := range result.Contents {
    fmt.Printf("%s - %d bytes\n", *item.Key, *item.Size)
}
```

#### AWS CLI

```bash
# List all objects
aws s3 ls s3://your-bucket/ \
  --endpoint-url $OBJECT_STORE_ENDPOINT

# List objects with a prefix
aws s3 ls s3://your-bucket/documents/ \
  --recursive \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## Delete Objects

Delete objects from your bucket:

#### Python

```python
# Delete a single object
s3_client.delete_object(
    Bucket='your-bucket',
    Key='documents/document.txt'
)

# Bulk delete
s3_client.delete_objects(
    Bucket='your-bucket',
    Delete={
        'Objects': [
            {'Key': 'file1.txt'},
            {'Key': 'file2.txt'},
            {'Key': 'file3.txt'}
        ]
    }
)
```

#### Node.js

```javascript
import { DeleteObjectCommand, DeleteObjectsCommand } from '@aws-sdk/client-s3';

// Delete a single object
const deleteCommand = new DeleteObjectCommand({
  Bucket: 'your-bucket',
  Key: 'documents/document.txt'
});
await s3Client.send(deleteCommand);

// Bulk delete
const bulkDeleteCommand = new DeleteObjectsCommand({
  Bucket: 'your-bucket',
  Delete: {
    Objects: [
      { Key: 'file1.txt' },
      { Key: 'file2.txt' },
      { Key: 'file3.txt' }
    ]
  }
});
await s3Client.send(bulkDeleteCommand);
```

#### Go

```go
import "github.com/aws/aws-sdk-go/service/s3"

// Delete a single object
_, err := svc.DeleteObject(&s3.DeleteObjectInput{
    Bucket: aws.String("your-bucket"),
    Key:    aws.String("documents/document.txt"),
})
if err != nil {
    panic(err)
}

// Bulk delete
_, err = svc.DeleteObjects(&s3.DeleteObjectsInput{
    Bucket: aws.String("your-bucket"),
    Delete: &s3.Delete{
        Objects: []*s3.ObjectIdentifier{
            {Key: aws.String("file1.txt")},
            {Key: aws.String("file2.txt")},
            {Key: aws.String("file3.txt")},
        },
    },
})
if err != nil {
    panic(err)
}
```

#### AWS CLI

```bash
# Delete a single object
aws s3 rm s3://your-bucket/documents/document.txt \
  --endpoint-url $OBJECT_STORE_ENDPOINT

# Delete multiple objects with a prefix
aws s3 rm s3://your-bucket/old-data/ \
  --recursive \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## Copy Objects

Copy objects within or between buckets:

#### Python

```python
# Copy an object
s3_client.copy_object(
    CopySource={'Bucket': 'your-bucket', 'Key': 'source.pdf'},
    Bucket='your-bucket',
    Key='backup/source.pdf'
)
```

#### Node.js

```javascript
import { CopyObjectCommand } from '@aws-sdk/client-s3';

const command = new CopyObjectCommand({
  CopySource: 'your-bucket/source.pdf',
  Bucket: 'your-bucket',
  Key: 'backup/source.pdf'
});

await s3Client.send(command);
```

#### Go

```go
import "github.com/aws/aws-sdk-go/service/s3"

// Copy an object
_, err := svc.CopyObject(&s3.CopyObjectInput{
    CopySource: aws.String("your-bucket/source.pdf"),
    Bucket:     aws.String("your-bucket"),
    Key:        aws.String("backup/source.pdf"),
})
if err != nil {
    panic(err)
}
```

#### AWS CLI

```bash
# Copy within the same bucket
aws s3 cp s3://your-bucket/source.pdf s3://your-bucket/backup/source.pdf \
  --endpoint-url $OBJECT_STORE_ENDPOINT

# Copy between buckets (if you have access to multiple buckets)
aws s3 cp s3://source-bucket/file.pdf s3://dest-bucket/file.pdf \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## Working with Large Files

For files larger than 100 MB, use multipart uploads for better performance and reliability:

#### Python

```python
# Create multipart upload
response = s3_client.create_multipart_upload(
    Bucket='your-bucket',
    Key='large-file.zip'
)
upload_id = response['UploadId']

# Upload parts (example with 2 parts)
part1 = s3_client.upload_part(
    Bucket='your-bucket',
    Key='large-file.zip',
    PartNumber=1,
    UploadId=upload_id,
    Body=b'part 1 data...'
)

part2 = s3_client.upload_part(
    Bucket='your-bucket',
    Key='large-file.zip',
    PartNumber=2,
    UploadId=upload_id,
    Body=b'part 2 data...'
)

# Complete the upload
s3_client.complete_multipart_upload(
    Bucket='your-bucket',
    Key='large-file.zip',
    UploadId=upload_id,
    MultipartUpload={
        'Parts': [
            {'ETag': part1['ETag'], 'PartNumber': 1},
            {'ETag': part2['ETag'], 'PartNumber': 2}
        ]
    }
)
```

#### Node.js

```javascript
import { Upload } from '@aws-sdk/lib-storage';
import { createReadStream } from 'fs';

const upload = new Upload({
  client: s3Client,
  params: {
    Bucket: 'your-bucket',
    Key: 'large-file.zip',
    Body: createReadStream('large-file.zip')
  },
  queueSize: 4,
  partSize: 1024 * 1024 * 25, // 25 MB
  leavePartsOnError: false
});

await upload.done();
```

#### Go

```go
import (
    "os"
    "github.com/aws/aws-sdk-go/service/s3/s3manager"
)

// The S3 manager automatically uses multipart for large files
file, err := os.Open("large-file.zip")
if err != nil {
    panic(err)
}
defer file.Close()

uploader := s3manager.NewUploader(sess, func(u *s3manager.Uploader) {
    u.PartSize = 25 * 1024 * 1024 // 25 MB per part
    u.Concurrency = 10
})

_, err = uploader.Upload(&s3manager.UploadInput{
    Bucket: aws.String("your-bucket"),
    Key:    aws.String("large-file.zip"),
    Body:   file,
})
if err != nil {
    panic(err)
}
```

#### AWS CLI

```bash
# The AWS CLI automatically uses multipart upload for large files
aws s3 cp large-file.zip s3://your-bucket/large-file.zip \
  --endpoint-url $OBJECT_STORE_ENDPOINT
```

## Next Steps

* Review [API compatibility](/object-storage/docs/api-compatibility) to understand supported operations
* See the [Amazon S3 API Documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) for detailed API reference