Skip to content

ChunkFlowUpload SDK

A universal large file upload solution with chunked upload, resumable upload, and instant upload capabilities

ChunkFlow

Quick Start

bash
pnpm add @chunkflowjs/core @chunkflowjs/upload-client-react
bash
npm install @chunkflowjs/core @chunkflowjs/upload-client-react
bash
yarn add @chunkflowjs/core @chunkflowjs/upload-client-react

React Example

tsx
import { UploadProvider } from "@chunkflowjs/upload-client-react";
import { UploadButton, UploadList } from "@chunkflowjs/upload-component-react";
import { createFetchAdapter } from "@chunkflowjs/core";

const adapter = createFetchAdapter({
  baseURL: "http://localhost:3000/api",
});

function App() {
  return (
    <UploadProvider requestAdapter={adapter}>
      <UploadButton accept="image/*,video/*" maxSize={100 * 1024 * 1024}>
        Select Files
      </UploadButton>
      <UploadList />
    </UploadProvider>
  );
}

Vue Example

vue
<script setup>
import { createApp } from "vue";
import { UploadPlugin } from "@chunkflowjs/upload-client-vue";
import { UploadButton, UploadList } from "@chunkflowjs/upload-component-vue";
import { createFetchAdapter } from "@chunkflowjs/core";

const adapter = createFetchAdapter({
  baseURL: "http://localhost:3000/api",
});

const app = createApp(App);
app.use(UploadPlugin, { requestAdapter: adapter });
</script>

<template>
  <UploadButton accept="image/*,video/*" :max-size="100 * 1024 * 1024"> Select Files </UploadButton>
  <UploadList />
</template>

Why ChunkFlow?

ChunkFlow is designed with a "highly decoupled, progressive enhancement, performance-first" philosophy:

  • Highly Decoupled: Each layer is independent - use only what you need
  • Performance First: Hash calculation and upload run in parallel, dynamic chunking, concurrency control
  • Great UX: Instant upload, resumable upload, real-time progress feedback
  • Developer Friendly: TypeScript type safety, comprehensive docs, ready-to-use components
  • Production Ready: Complete error handling, retry mechanisms, test coverage

Released under the MIT License.