Skip to content
Files SDK
Esc
navigateopen⌘Jpreview
On this page

Tigris

Tigris globally-distributed object storage via the S3-compatible API. Fixed global endpoint, region defaults to auto.

Installation

@aws-sdk/client-s3, @aws-sdk/s3-presigned-post, and @aws-sdk/s3-request-presigner are optional peer dependencies of files-sdk - install alongside the SDK so the adapter’s imports resolve at runtime.

npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
pnpm add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
yarn add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
bun add files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner

Usage

import { Files } from "files-sdk";
import { tigris } from "files-sdk/tigris";

const files = new Files({
  adapter: tigris({
    bucket: "uploads",
    // endpoint defaults to https://fly.storage.tigris.dev
    // region defaults to "auto" (Tigris routes globally)
    // accessKeyId / secretAccessKey auto-loaded from
    // TIGRIS_ACCESS_KEY_ID / TIGRIS_SECRET_ACCESS_KEY
  }),
});

Tigris globally-distributed object storage via its S3-compatible API. A thin wrapper around the S3 adapter - fixed global endpoint, region defaults to "auto" for signing, virtual-hosted-style addressing, errors relabelled. Auto-loads from TIGRIS_ACCESS_KEY_ID and TIGRIS_SECRET_ACCESS_KEY. Generate access keys in the Tigris console (or via the Fly CLI: fly storage create).

Options

PropType
bucketstring

Tigris bucket name. The adapter scopes all operations to it.

Typestring
endpoint?string

Override the Tigris endpoint. Defaults to `https://fly.storage.tigris.dev` — Tigris serves a single global endpoint and routes to the nearest region automatically. Override for pinned-region testing or a private deployment.

Typestring
accessKeyId?string

Static access key ID. Falls back to `TIGRIS_ACCESS_KEY_ID`; required if that env var isn't set.

Typestring
secretAccessKey?string

Static secret access key. Falls back to `TIGRIS_SECRET_ACCESS_KEY`; required if that env var isn't set.

Typestring
region?string

SigV4 region used for signing. Defaults to `"auto"` — Tigris is a globally-distributed object store and doesn't use the SigV4 region for routing, but the signature requires *some* value. Leave the default unless you have a reason to change it.

Typestring
forcePathStyle?boolean

Use path-style addressing (`/<bucket>/<key>`) rather than virtual-hosted style. Defaults to `false` — virtual-hosted is canonical for Tigris.

Typeboolean
publicBaseUrl?string

Origin used to build URLs from `url()`. When set, `url(key)` returns `${publicBaseUrl}/${key}` and skips signing. For public buckets the natural value is `https://${bucket}.fly.storage.tigris.dev`; a custom domain bound to the bucket also works. When unset, `url()` falls back to a presigned GetObject (default expiry: 1 hour).

Typestring
defaultUrlExpiresIn?number

Default expiry, in seconds, for the presigned URLs returned by `url()` when `publicBaseUrl` is not set. Defaults to 3600 (1 hour).

Typenumber

Compatibility

Method Status Notes
upload
download
delete
list
search
head
exists
copy
url
signedUploadUrl

Was this page helpful?