Search packages, repositories and app categories

Package detailsv1.1.0

chunked_uploader

An easy-to-use package to upload files in chunks using Dio for mobile, desktop and web.

AndroidiOSmacOSWindowsLinux
30-day downloads
1.5K
Likes
35
Pub points
150

Install package

flutter pub add chunked_uploader

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A lightweight Flutter package that simplifies uploading large files in chunks using Dio. It supports mobile, desktop, and web platforms, ensuring reliable uploads even with unstable connections. The package handles chunking, progress tracking, and resumable uploads seamlessly, making it ideal for applications requiring robust file transfer capabilities. Built with simplicity and performance in mind, it integrates smoothly into existing projects.

Use cases

  • Uploading large video files
  • Resumable file transfers
  • Progress tracking during uploads
  • Web and cross-platform file sharing
  • Offline-capable uploads

Key features

  • Chunked file upload
  • Progress monitoring
  • Resumable uploads
  • Cross-platform support
  • Dio-based integration

Suitable for

  • Large file handling
  • Network-sensitive apps
  • Mobile and desktop apps
  • Web file uploaders
  • Apps needing upload resilience

Considerations

  • Requires Dio dependency
  • Server-side chunk handling needed
  • Not suitable for small files
  • Limited to HTTP uploads
  • No built-in authentication

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Chunked Uploader

A plugin to upload files to server in chunks.

pub package

Usage

To use this plugin, add chunked_uploader as dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  chunked_uploader: ^1.0.0
  file_picker: ^5.2.5
  dio: ^4.0.6

Example

final file =
    (await FilePicker.platform.pickFiles(withReadStream: true))!.files.single;
final dio = Dio(BaseOptions(
  baseUrl: 'https://example.com/api',
  headers: {'Authorization': 'Bearer'},
));
final uploader = ChunkedUploader(dio);

// using data stream
final response = await uploader.upload(
  fileName: file.name,
  fileSize: file.size,
  fileDataStream: file.readStream!,
  maxChunkSize: 500000,
  path: '/file',
  onUploadProgress: (progress) => print(progress),
);
// using path
final response = await uploader.uploadUsingFilePath(
  fileName: file.name,
  filePath: file.path!,
  maxChunkSize: 500000,
  path: '/file',
  onUploadProgress: (progress) => print(progress),
);

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.