---
title: iDrive e2
description: iDrive e2 via the S3-compatible API. Endpoint required (iDrive hostnames are tied to the cluster your bucket lives in).
---

## 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 { idriveE2 } from "files-sdk/idrive-e2";

const files = new Files({
  adapter: idriveE2({
    bucket: "uploads",
    endpoint: "https://q9z7.va.idrivee2-NN.com",
    // accessKeyId / secretAccessKey auto-loaded from
    // IDRIVE_E2_ACCESS_KEY_ID / IDRIVE_E2_SECRET_ACCESS_KEY
  }),
});
```

iDrive e2 via its S3-compatible API. A thin wrapper around the S3 adapter with iDrive-friendly defaults - endpoint is required (iDrive e2 hostnames are tied to the cluster your bucket lives in and don't follow a public pattern; copy it from the iDrive e2 dashboard), region defaulted, errors relabelled. Auto-loads from `IDRIVE_E2_ACCESS_KEY_ID` and `IDRIVE_E2_SECRET_ACCESS_KEY`. Generate access keys in the iDrive e2 dashboard under Access Keys.

## Options

<AutoTypeTable
  path="../../packages/files-sdk/src/idrive-e2/index.ts"
  name="IdriveE2AdapterOptions"
/>

## Compatibility

| Method | Status | Notes |
| --- | :-: | --- |
| `upload` | ✅ |  |
| `download` | ✅ |  |
| `delete` | ✅ |  |
| `list` | ⚠️ | The S3 list API returns no per-object `Content-Type`, so `type` is inferred from the key's extension (`application/octet-stream` when unknown). Use `head()` for the stored value. |
| `search` | ✅ |  |
| `head` | ✅ |  |
| `exists` | ✅ |  |
| `copy` | ✅ |  |
| `url` | ✅ |  |
| `signedUploadUrl` | ✅ |  |
