# @atlaskit/chunkinator

> Upload large files from the browser with ease

Latest version **8.2.0** (published 2026-09-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @atlaskit/chunkinator
pnpm add @atlaskit/chunkinator
yarn add @atlaskit/chunkinator
bun add @atlaskit/chunkinator
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.2.0 |
| Published | 2026-09-09 |
| First published | 2020-04-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 46.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | atlassianartifactteam |

## Links

- npm: https://www.npmjs.com/package/@atlaskit/chunkinator
- Repository: https://bitbucket.org/atlassian/atlassian-frontend-mirror
- Homepage: https://bitbucket.org/atlassian/atlassian-frontend-mirror#readme
- Issues: https://bitbucket.org/atlassian/atlassian-frontend-mirror/issues
- npm.io page: https://npm.io/package/@atlaskit/chunkinator

## Dependencies (2)

- [rxjs](https://npm.io/package/rxjs.md) ^5.5.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0

## Recent versions

- 8.2.0 (latest) — 2026-09-09
- 4.2.2 (next) — 2023-05-17
- 8.1.0 — 2026-08-29
- 8.0.0 — 2026-06-16
- 7.1.0 — 2026-04-28
- 7.0.0 — 2025-02-24
- 6.2.0 — 2025-01-31
- 6.1.0 — 2024-08-21
- 6.0.1 — 2024-03-20
- 6.0.0 — 2024-02-13
- 5.0.0 — 2023-12-13
- 4.2.4 — 2023-09-08
- 4.2.3 — 2023-08-30
- 4.2.1 — 2023-05-15
- 4.2.0 — 2023-05-08
- … 20 more at https://npm.io/package/@atlaskit/chunkinator/versions

## README

# chunkinator

Upload large files from the browser with ease

# Pipeline pieces description

See `examples/integrator.ts` for good example of usage.

```Javascript
import {chunkinator} from '@atlaskit/chunkinator';
```

`chunkinator` is a main customizable high level component that gives you a way to upload large files.
It takes a file as an input and pushes it through Observable pipe that consist of the following parts:

- `slicenator`
- `hashinator`
- `uploadinator`
- `processinator`

As a second argument `chunkinator` takes configuration options with following interface:

```Typescript
interface Options {
  chunkSize: number;
  hashingConcurrency: number;
  hashingFunction?: HashingFunction;
  uploadingConcurrency: number;
  uploadingFunction: UploadingFunction;
  processingBatchSize: number;
  processingFunction?: ProcessingFunction;
}
```

As a third argument `chunkinator` takes list of handy callbacks. Currently there is only one: `onProgress`.

## slicenator

This component takes a blob, chunk size and returns Observable sequential stream of blob chunks.

Options' `chunkSize` is what defines chunk size

## hashinator

This component takes stream of blobs and hashes each chunk. Returning stream contains blob and it's hash.

Options' `hashingConcurrency` defines how many
chunks are hashed at the same time. `hashingFunction` is optional hashing function. If `hashingFunction` is not
provided `SHA-1` will be used instead.

## uploadinator

This component takes hashed blobs and uploads them if blob doesn't exists on a backend.

Options' `uploadingFunction` is a callback that takes a blob and uploads it to the server.
`uploadingConcurrency` controls how many of these calls happens at the same time.

## processinator

With this component consumer has an opportunity to finalize already uploaded chunks in some way.

Options' `processingFunction` defines a function that is called with sequential batches of uploaded chunks.
`processingBatchSize` controls how many uploaded chunks are given to processing function.

## onProgress callback

This callback is called with every uploaded chunk. The only argument it is called with a portion of already
uploaded chunks to it's total number.

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