---
title: Storj
description: Storj DCS via the S3-compatible Gateway. Defaults to the hosted Gateway MT, path-style addressing on.
peerDeps:
  - "@aws-sdk/client-s3"
  - "@aws-sdk/s3-presigned-post"
  - "@aws-sdk/s3-request-presigner"
---

## 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.

```package-install
files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
```

## Usage

```ts lineNumbers
import { Files } from "files-sdk";
import { storj } from "files-sdk/storj";

const files = new Files({
  adapter: storj({
    bucket: "uploads",
    // endpoint defaults to https://gateway.storjshare.io (Gateway MT).
    // Pass a self-hosted Gateway ST URL to override.
    // accessKeyId / secretAccessKey auto-loaded from
    // STORJ_ACCESS_KEY_ID / STORJ_SECRET_ACCESS_KEY
  }),
});
```

## Options

<AutoTypeTable
  path="../../packages/files-sdk/src/storj/index.ts"
  name="StorjAdapterOptions"
/>

## Compatibility

| Method            | Status | Notes |
| ----------------- | :----: | ----- |
| `upload`          |   ✅   |       |
| `download`        |   ✅   |       |
| `delete`          |   ✅   |       |
| `list`            |   ✅   |       |
| `search`          |   ✅   |       |
| `head`            |   ✅   |       |
| `exists`          |   ✅   |       |
| `copy`            |   ✅   |       |
| `url`             |   ✅   |       |
| `signedUploadUrl` |   ✅   |       |
