# How to access an uploaded file in object storage

Source: https://docs.quake.ai/docs/object/how-to/access-uploaded-file
Markdown: https://docs.quake.ai/docs/object/how-to/access-uploaded-file.md

---

# How to access an uploaded file in object storage

Download or view a file stored in an object storage bucket. For public buckets, you can also reach files through a direct URL without authentication.

<PrerequisiteBlock methods={["console", "cli", "api"]}>

- An object storage bucket containing at least one uploaded file
- For S3-compatible CLI and API: [S3 credentials](/docs/object/how-to/create-s3-credentials) configured

</PrerequisiteBlock>

## Download or view a file

<MethodTabs>
<Method label="Console">

<NoMoreButton />

1. Go to **Storage** > **Object Storage**.
2. Select the bucket containing the file.
3. Navigate to the folder if needed.
4. On the file's row, open the **Settings** gear icon dropdown and select **Download File**. The same dropdown also exposes `Edit`, `Copy`, `Cut`, `Rename`, and `Delete` for other per-file actions.

For public buckets, the Console shows a direct URL you can share or open in a browser.

</Method>
<Method label="CLI">




Download a file to your current directory:

```bash
openstack object save my-bucket file.txt
```

Save to a specific path:

```bash
openstack object save --file /tmp/downloaded-file.txt my-bucket file.txt
```




Using `s3cmd`:

```bash
s3cmd get s3://my-bucket/file.txt /path/to/downloaded-file.txt
```

Using the AWS CLI:

```bash
aws s3 cp s3://my-bucket/file.txt /path/to/downloaded-file.txt \
  --endpoint-url "https://object.REGION.rumble.cloud"
```




</Method>
<Method label="API">

<ObjectApiEnvironment />

Download using the Swift API:

```bash
curl -o downloaded-file.txt "$OS_SWIFT_URL/my-bucket/file.txt" \
  -H "X-Auth-Token: $OS_TOKEN"
```

For public objects, omit the authentication header:

```bash
curl -o downloaded-file.txt "$OS_SWIFT_URL/my-bucket/file.txt"
```

Stream content directly (for text files):

```bash
curl "$OS_SWIFT_URL/my-bucket/file.txt" \
  -H "X-Auth-Token: $OS_TOKEN"
```




Download a file using `boto3`:

```python
import boto3
from botocore.exceptions import ClientError

s3 = boto3.client(
    "s3",
    endpoint_url="YOUR_S3_ENDPOINT",
    aws_access_key_id="YOUR_ACCESS_KEY",
    aws_secret_access_key="YOUR_SECRET_KEY",
)

# Download to a local file
s3.download_file("my-bucket", "file.txt", "downloaded-file.txt")

# Read object content directly into memory
response = s3.get_object(Bucket="my-bucket", Key="file.txt")
content = response["Body"].read()
print(content.decode("utf-8"))
```

Generate a presigned URL to share temporary access without credentials:

```python
try:
    url = s3.generate_presigned_url(
        "get_object",
        Params={"Bucket": "my-bucket", "Key": "file.txt"},
        ExpiresIn=3600,  # URL valid for 1 hour
    )
    print(f"Presigned URL: {url}")
except ClientError as e:
    print(f"Failed to generate URL: {e.response['Error']['Message']}")
```




</Method>
</MethodTabs>

## Get the public URL for a file

If you set the bucket to public read access, each object has a direct URL:

```text
https://object.REGION.rumble.cloud/swift/v1/AUTH_PROJECT_ID/BUCKET_NAME/FILE_PATH
```

In public buckets, each object row lists a direct URL in the **Access & Information** column.

## See also

- [Upload a file](/docs/object/how-to/upload-file)
- [Grant access control](/docs/object/how-to/grant-access-control)
- [Object storage console reference](/reference/object-storage/console/object-storage)
