> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solya.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage

> File storage backends, configuration, and signed-URL access.

Solya stores uploaded files (e.g. product images) through a small storage abstraction with
two backends.

## Backends

| Backend                | `STORAGE_TYPE` | Use                                             |
| ---------------------- | -------------- | ----------------------------------------------- |
| **Local filesystem**   | `local`        | Development.                                    |
| **S3 / S3-compatible** | `s3`           | Production (AWS S3 or Scaleway Object Storage). |

The backend is selected by the `STORAGE_TYPE` environment variable.

## Configuration

**Local:**

* `STORAGE_LOCAL_PATH` — filesystem directory (default `public/uploads`).
* `STORAGE_LOCAL_URL` — public URL prefix (default `/uploads`).

**S3 (AWS or Scaleway):**

* `S3_BUCKET_NAME` — the bucket.
* `AWS_REGION` — the region.
* `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` — credentials (optional; an IAM role is
  used if omitted).
* `S3_ENDPOINT` — custom endpoint for S3-compatible providers (e.g. Scaleway).

## Access via signed URLs

Files are stored privately. The app serves them through **pre-signed URLs** generated on
read, with a default expiry of **one hour**. Local storage returns direct URLs (no
expiry). A fresh signature is produced each time, so signed URLs are not cached.

<Note>
  Object keys are organized per organization, keeping each tenant's files separated. The
  storage layer is plain file I/O; any image processing happens upstream in the
  upload handlers.
</Note>
