# @flystorage/multer-storage

Latest version **1.2.0** (published 2025-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @flystorage/multer-storage
pnpm add @flystorage/multer-storage
yarn add @flystorage/multer-storage
bun add @flystorage/multer-storage
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2025-09-13 |
| First published | 2023-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 313 |
| Author | Frank de Jonge |
| Maintainers | frankdejonge |
| Keywords | s3, file, storage, flystorage, filesystem |

## Links

- npm: https://www.npmjs.com/package/@flystorage/multer-storage
- Repository: https://github.com/duna-oss/flystorage
- Homepage: https://flystorage.dev/tools/multer/
- Issues: https://github.com/duna-oss/flystorage/issues
- npm.io page: https://npm.io/package/@flystorage/multer-storage

## Dependencies (3)

- [multer](https://npm.io/package/multer.md) ^2.0.2
- [@flystorage/file-storage](https://npm.io/package/@flystorage/file-storage.md) ^1.0.0
- [@flystorage/stream-mime-type](https://npm.io/package/@flystorage/stream-mime-type.md) ^1.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2025-09-13
- 1.1.0 — 2025-05-20
- 1.0.0 — 2024-12-12
- 0.1.2 — 2024-06-06
- 0.1.1 — 2024-06-06
- 0.1.0 — 2023-12-28
- 0.0.9 — 2023-12-11
- 0.0.8 — 2023-12-06
- 0.0.7 — 2023-12-06
- 0.0.6 — 2023-12-05
- 0.0.5 — 2023-12-05
- 0.0.4 — 2023-12-04

## README

<img src="https://raw.githubusercontent.com/duna-oss/flystorage/main/flystorage.svg" width="50px" height="50px" />

# Flystorage for multer

This package contains the Flystorage bindings for [multer](https://github.com/expressjs/multer).

This allows multer to upload to any of the supported Flystorage filesystems.

## Installation

Install all the required packages

```bash
npm install --save @flystorage/file-storage @flystorage/multer-storage
```

## Usage

```typescript
import {FileStorage} from '@flystorage/file-storage';
import {FlystorageMulterStorageEngine} from '@flystorage/multer-storage';
import multer from 'multer';

const adapter = createYourAdapter();
const fileStorage = new FileStorage(adapter);

const storage = new FlystorageMulterStorageEngine(
    uploadStorage,
    async (action, _req: express.Request, file: Express.Multer.File) => {
        if (action === 'handle') {
            return file.originalname;
        } else {
            return file.destination;
        }
    }
);

const uploader = multer({storage});
```

---
_Source: https://npm.io/package/@flystorage/multer-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
